// Lean compiler output
// Module: Lean.Data.RBMap
// Imports: public import Init.Data.Ord.Basic public import Init.Data.Nat.Linear
#include <lean/lean.h>
#if defined(__clang__)
#pragma clang diagnostic ignored "-Wunused-parameter"
#pragma clang diagnostic ignored "-Wunused-label"
#elif defined(__GNUC__) && !defined(__CLANG__)
#pragma GCC diagnostic ignored "-Wunused-parameter"
#pragma GCC diagnostic ignored "-Wunused-label"
#pragma GCC diagnostic ignored "-Wunused-but-set-variable"
#endif
#ifdef __cplusplus
extern "C" {
#endif
LEAN_EXPORT lean_object* l_Lean_RBMap_fold(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_RBMap_fromArray___redArg(lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_RBNode_ctorElim(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_RBColor_toCtorIdx___boxed(lean_object*);
LEAN_EXPORT lean_object* l_Lean_RBMap_find_x21(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_RBMap_intersectBy(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
static lean_object* l_Lean_RBMap_fromArray___closed__5;
LEAN_EXPORT lean_object* l_Lean_RBNode_map___redArg(lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_RBNode_forIn___lam__0(lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_RBNode_instEmptyCollection(lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_RBMap_instRepr___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT uint8_t l_Lean_RBMap_isSingleton___redArg(lean_object*);
static lean_object* l_Lean_RBMap_fromArray___closed__9;
lean_object* lean_mk_empty_array_with_capacity(lean_object*);
LEAN_EXPORT lean_object* l_Lean_RBNode_any___boxed(lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_RBMap_min___redArg(lean_object*);
static lean_object* l_Lean_RBMap_fromArray___closed__1;
LEAN_EXPORT lean_object* l___private_Lean_Data_RBMap_0__Lean_RBNode_depth_match__1_splitter___redArg(lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_RBNode_insert___at___00Lean_RBMap_mergeBy_spec__0(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_RBNode_fold___at___00Lean_RBMap_intersectBy_spec__0(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_RBMap_max_x21___redArg___boxed(lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_RBNode_forM(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_RBColor_ctorIdx___boxed(lean_object*);
LEAN_EXPORT lean_object* l_Lean_RBNode_forIn___redArg(lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_RBMap_min___boxed(lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_RBMap_contains___redArg___boxed(lean_object*, lean_object*, lean_object*);
LEAN_EXPORT uint8_t l_Lean_RBNode_isSingleton___redArg(lean_object*);
LEAN_EXPORT lean_object* l_Lean_RBMap_findD___redArg(lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_RBNode_lowerBound___redArg(lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_RBNode_max(lean_object*, lean_object*, lean_object*);
static lean_object* l_Lean_RBNode_toArray___redArg___closed__0;
LEAN_EXPORT lean_object* l_Lean_RBMap_forIn___lam__0(lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_RBColor_black_elim(lean_object*, uint8_t, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_RBMap_toList___redArg___lam__0(lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_RBNode_appendTrees(lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_RBNode_isBlack___boxed(lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_RBMap_isEmpty___boxed(lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_RBNode_revFold(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_mkRBMap___boxed(lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_RBMap_forM___lam__0(lean_object*, lean_object*, lean_object*, lean_object*);
lean_object* l_Prod_repr___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_RBMap_toArray___redArg___lam__0(lean_object*, lean_object*, lean_object*);
lean_object* lean_array_push(lean_object*, lean_object*);
static lean_object* l_Lean_RBMap_find_x21___closed__0;
LEAN_EXPORT lean_object* l_Lean_RBMap_fold___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_RBNode_forM___redArg___lam__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_RBNode_max___redArg___boxed(lean_object*);
LEAN_EXPORT uint8_t l_Lean_RBNode_isBlack(lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_RBMap_forIn___redArg(lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_RBMap_max___boxed(lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_RBMap_foldM___redArg(lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_RBMap_min(lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_RBColor_toCtorIdx(uint8_t);
LEAN_EXPORT lean_object* l_Lean_RBMap_ofList(lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_RBMap_min_x21___redArg___boxed(lean_object*, lean_object*, lean_object*);
static lean_object* l_Lean_RBMap_min_x21___closed__0;
LEAN_EXPORT uint8_t l_Lean_RBMap_any___redArg(lean_object*, lean_object*);
LEAN_EXPORT uint8_t l_Lean_RBMap_any(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_RBMap_filter(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_RBMap_forM___redArg(lean_object*, lean_object*, lean_object*);
static lean_object* l_Lean_RBMap_instRepr___redArg___lam__0___closed__0;
LEAN_EXPORT lean_object* l_Lean_RBNode_ins___at___00Lean_RBNode_insert___at___00Lean_RBMap_mergeBy_spec__0_spec__0(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT uint8_t l_Lean_RBMap_all(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_RBNode_setBlack___redArg(lean_object*);
LEAN_EXPORT lean_object* l_Lean_RBNode_mapM___redArg___lam__3(uint8_t, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_RBMap_instForInProdOfMonad___redArg___lam__2(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_RBMap_foldM(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_RBMap_instRepr___redArg(lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_RBMap_ofList___redArg(lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_RBNode_fold___at___00Lean_RBNode_toArray_spec__0___redArg___boxed(lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_RBNode_fold___at___00Lean_RBMap_filterMap_spec__0___redArg(lean_object*, lean_object*, lean_object*, lean_object*);
lean_object* l_panic___redArg(lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_RBMap_max_x21___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_RBMap_fromList___redArg(lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_RBMap_depth(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
static lean_object* l_Lean_RBMap_fromArray___closed__4;
LEAN_EXPORT lean_object* l_Lean_RBMap_instForInProdOfMonad___redArg___lam__0(lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_RBMap_filterMap(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l___private_Lean_Data_RBMap_0__Lean_RBNode_forIn_visit___redArg___lam__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_RBMap_forM___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT uint8_t l_Lean_RBNode_all(lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_RBMap_contains___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_RBMap_find_x3f___redArg(lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_RBMap_isSingleton___boxed(lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_RBMap_instRepr(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l___private_Lean_Data_RBMap_0__Lean_RBNode_appendTrees_match__1_splitter(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
lean_object* l_Id_instMonad___lam__4___boxed(lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT uint8_t l_Lean_RBMap_isSingleton(lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_RBNode_depth___redArg___boxed(lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_RBNode_balRight(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_RBMap_size___redArg___boxed(lean_object*);
LEAN_EXPORT lean_object* l_Lean_RBMap_max_x21(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_RBNode_fold___at___00Lean_RBNode_toArray_spec__0___redArg(lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_RBMap_findD___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
static lean_object* l_Lean_RBMap_toArray___redArg___closed__0;
LEAN_EXPORT lean_object* l_Lean_RBNode_mapM___redArg___lam__2(lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_RBMap_forM(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_RBNode_fold___at___00Lean_RBMap_filter_spec__0(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_RBMap_find_x21___redArg(lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l___private_Lean_Data_RBMap_0__Lean_RBNode_depth_match__1_splitter(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_RBNode_size___boxed(lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_RBMap_revFold(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_RBNode_del___redArg(lean_object*, lean_object*, lean_object*);
size_t lean_usize_of_nat(lean_object*);
LEAN_EXPORT lean_object* l_Lean_RBColor_ctorElim(lean_object*, lean_object*, uint8_t, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_RBNode_appendTrees___redArg(lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_RBNode_max___redArg(lean_object*);
LEAN_EXPORT lean_object* l_Lean_RBMap_isSingleton___redArg___boxed(lean_object*);
LEAN_EXPORT lean_object* l_Lean_RBMap_fromList(lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_RBNode_leaf_elim___redArg(lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_RBMap_all___redArg___boxed(lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_RBColor_ctorElim___redArg___boxed(lean_object*);
LEAN_EXPORT lean_object* l_Lean_RBMap_size___boxed(lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_RBMap_any___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_RBNode_size___redArg___boxed(lean_object*);
LEAN_EXPORT lean_object* l___private_Lean_Data_RBMap_0__Lean_RBNode_appendTrees_match__1_splitter___redArg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
static lean_object* l_Lean_RBMap_instRepr___redArg___lam__0___closed__1;
LEAN_EXPORT lean_object* l_Lean_rbmapOf___redArg(lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_rbmapOf(lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_RBMap_erase___redArg(lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_RBNode_mapM___redArg___lam__0(lean_object*, lean_object*, lean_object*, lean_object*);
lean_object* l_Array_empty(lean_object*);
LEAN_EXPORT lean_object* l_Lean_RBMap_findCore_x3f(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_RBMap_forIn(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_RBNode_min___boxed(lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_RBNode_all___boxed(lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_RBNode_fold___redArg(lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_RBNode_mapM___redArg(lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_RBMap_findD(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
lean_object* l_List_foldl___redArg(lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_RBMap_mergeBy___redArg(lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_RBMap_filter___redArg(lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_RBNode_singleton___redArg(lean_object*, lean_object*);
lean_object* l_Id_instMonad___lam__2___boxed(lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_RBMap_erase(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_RBNode_max___boxed(lean_object*, lean_object*, lean_object*);
LEAN_EXPORT uint8_t l_Lean_RBNode_all___redArg(lean_object*, lean_object*);
lean_object* l_instReprTupleOfRepr___redArg(lean_object*);
LEAN_EXPORT lean_object* l_Lean_RBNode_any___redArg___boxed(lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_RBMap_instForInProdOfMonad___redArg(lean_object*);
static lean_object* l_Lean_RBMap_max_x21___closed__0;
LEAN_EXPORT lean_object* l_Lean_RBMap_maxDepth___redArg___lam__0___boxed(lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_RBNode_foldM___redArg___lam__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT uint8_t l_Lean_RBMap_contains(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_mkRBMap(lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_RBNode_fold___at___00Lean_RBMap_size_spec__0___boxed(lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_RBMap_min_x21___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_RBNode_isRed___boxed(lean_object*, lean_object*, lean_object*);
static lean_object* l_Lean_RBMap_fromArray___closed__3;
LEAN_EXPORT lean_object* l_Lean_RBMap_fromList___lam__0(lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_RBNode_fold___at___00Lean_RBMap_size_spec__0(lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_RBMap_empty___boxed(lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_instInhabitedRBMap___boxed(lean_object*, lean_object*, lean_object*);
static lean_object* l_Lean_RBMap_min_x21___closed__3;
static lean_object* l_Lean_RBMap_fromArray___closed__6;
LEAN_EXPORT lean_object* l_Lean_RBMap_maxDepth___redArg___boxed(lean_object*);
LEAN_EXPORT lean_object* l_Lean_RBNode_find(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_RBColor_red_elim___boxed(lean_object*, lean_object*, lean_object*, lean_object*);
static lean_object* l_Lean_RBMap_fromArray___closed__2;
LEAN_EXPORT lean_object* l_Lean_RBNode_isRed___redArg___boxed(lean_object*);
lean_object* l_List_repr___redArg(lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_RBColor_noConfusion___redArg(uint8_t, uint8_t);
LEAN_EXPORT uint8_t l_Lean_RBMap_isEmpty___redArg(lean_object*);
LEAN_EXPORT lean_object* l_Lean_RBNode_fold___at___00Lean_RBMap_size_spec__0___redArg(lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_RBMap_max___redArg(lean_object*);
LEAN_EXPORT lean_object* l_List_foldl___at___00Lean_rbmapOf_spec__0(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_RBColor_red_elim___redArg___boxed(lean_object*);
LEAN_EXPORT lean_object* l_Lean_RBMap_findCore_x3f___redArg(lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_RBMap_instForInProdOfMonad(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_RBNode_insert___redArg(lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_RBMap_forIn___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_RBNode_min___redArg___boxed(lean_object*);
LEAN_EXPORT lean_object* l_Lean_RBNode_all___redArg___boxed(lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_RBNode_mapM___redArg___lam__1(lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT uint8_t l_Lean_RBMap_all___redArg(lean_object*, lean_object*);
lean_object* l_Id_instMonad___lam__3(lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_RBMap_any___redArg___boxed(lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_RBNode_node_elim___redArg(lean_object*, lean_object*);
LEAN_EXPORT uint8_t l_Lean_RBNode_isRed(lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_RBColor_red_elim___redArg(lean_object*);
LEAN_EXPORT lean_object* l_Lean_RBMap_max___redArg___boxed(lean_object*);
LEAN_EXPORT uint8_t l_Lean_RBNode_any___redArg(lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_RBNode_erase___redArg(lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_RBNode_fold___at___00Lean_RBMap_mergeBy_spec__3(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_RBNode_setRed(lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_RBNode_find___at___00Lean_RBMap_mergeBy_spec__2___redArg(lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_RBNode_balance2___redArg(lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_RBMap_max(lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_RBNode_balRight___redArg(lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_RBNode_ins___redArg(lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_RBMap_size(lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_RBNode_balance1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_instEmptyCollectionRBMap(lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_RBMap_insert(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_RBNode_leaf_elim(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_RBNode_min(lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l___private_Lean_Data_RBMap_0__Lean_RBNode_forIn_visit___redArg(lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_RBColor_black_elim___boxed(lean_object*, lean_object*, lean_object*, lean_object*);
static lean_object* l_Lean_RBMap_find_x21___closed__2;
LEAN_EXPORT lean_object* l_Lean_RBNode_fold___at___00Lean_RBMap_filterMap_spec__0(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_RBNode_ctorIdx___redArg(lean_object*);
LEAN_EXPORT lean_object* l_Lean_RBNode_depth(lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_RBNode_ctorIdx(lean_object*, lean_object*, lean_object*);
static lean_object* l_Lean_RBMap_fromArray___closed__7;
LEAN_EXPORT lean_object* l_Lean_RBNode_min___redArg(lean_object*);
LEAN_EXPORT lean_object* l_Lean_RBNode_fold(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_RBMap_maxDepth___redArg___lam__0(lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_RBNode_findCore___redArg(lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_RBNode_fold___at___00Lean_RBMap_mergeBy_spec__3___redArg(lean_object*, lean_object*, lean_object*, lean_object*);
static lean_object* l_Lean_RBMap_fromArray___closed__0;
LEAN_EXPORT lean_object* l_Lean_RBNode_ins___at___00Lean_RBNode_insert___at___00Lean_RBMap_mergeBy_spec__0_spec__0___redArg(lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_RBMap_toArray___boxed(lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_RBNode_forM___redArg___lam__0(lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_RBNode_revFold___redArg(lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_RBMap_maxDepth(lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_RBNode_forIn(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_RBMap_min___redArg___boxed(lean_object*);
lean_object* l_Id_instMonad___lam__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT uint8_t l_Lean_RBNode_any(lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_RBNode_findCore(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_RBNode_mapM(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT uint8_t l_Lean_RBNode_isBlack___redArg(lean_object*);
LEAN_EXPORT lean_object* l_Lean_RBNode_balance2(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_RBMap_depth___redArg(lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_RBMap_fromArray(lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_RBColor_noConfusion___redArg___boxed(lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_RBMap_max_x21___redArg(lean_object*, lean_object*, lean_object*);
uint8_t lean_nat_dec_eq(lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_RBMap_instRepr___redArg___lam__0(lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_RBNode_ctorElim___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
uint8_t lean_nat_dec_lt(lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_RBMap_lowerBound(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_RBColor_ctorIdx(uint8_t);
LEAN_EXPORT lean_object* l_Lean_RBMap_isEmpty___redArg___boxed(lean_object*);
LEAN_EXPORT lean_object* l_Lean_RBColor_ctorElim___redArg(lean_object*);
LEAN_EXPORT lean_object* l_Lean_RBColor_black_elim___redArg___boxed(lean_object*);
LEAN_EXPORT lean_object* l_Lean_RBNode_toArray(lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_RBMap_maxDepth___boxed(lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_List_foldl___at___00Lean_rbmapOf_spec__0___redArg(lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_RBMap_toList(lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_instEmptyCollectionRBMap___boxed(lean_object*, lean_object*, lean_object*);
LEAN_EXPORT uint8_t l_Lean_RBMap_contains___redArg(lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_RBMap_depth___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_RBMap_findD___redArg___boxed(lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_RBNode_find___at___00Lean_RBMap_mergeBy_spec__2(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT uint8_t l_Lean_RBMap_isEmpty(lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_RBNode_forM___redArg(lean_object*, lean_object*, lean_object*);
lean_object* l_Repr_addAppParen(lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_RBNode_insert(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_RBMap_revFold___redArg(lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_RBNode_find___redArg(lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_RBNode_toArray___redArg(lean_object*);
LEAN_EXPORT lean_object* l_Lean_RBColor_red_elim(lean_object*, uint8_t, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_RBNode_balLeft(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT uint8_t l_Lean_RBNode_isRed___redArg(lean_object*);
lean_object* l___private_Init_Data_Array_Basic_0__Array_foldlMUnsafe_fold(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, size_t, size_t, lean_object*);
LEAN_EXPORT lean_object* l_Lean_RBMap_instForInProdOfMonad___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_RBColor_noConfusion(lean_object*, uint8_t, uint8_t, lean_object*);
static lean_object* l_Lean_RBMap_min_x21___closed__2;
LEAN_EXPORT lean_object* l_Lean_RBNode_mapM___redArg___lam__3___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l___private_Lean_Data_RBMap_0__Lean_RBNode_forIn_visit___redArg___lam__0(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_RBNode_fold___at___00Lean_RBNode_toArray_spec__0(lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_RBNode_del(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_RBMap_toList___boxed(lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_RBNode_insert___at___00Lean_RBMap_mergeBy_spec__0___redArg(lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_RBNode_foldM___redArg(lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_RBMap_size___redArg(lean_object*);
LEAN_EXPORT lean_object* l_Lean_RBNode_toArray___boxed(lean_object*, lean_object*, lean_object*);
lean_object* l_Id_instMonad___lam__6(lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_RBNode_depth___redArg(lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_RBNode_balance1___redArg(lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_RBNode_lowerBound(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_RBMap_min_x21___redArg(lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_RBColor_ctorElim___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_RBMap_toList___redArg(lean_object*);
LEAN_EXPORT lean_object* l_Lean_RBNode_ctorIdx___redArg___boxed(lean_object*);
LEAN_EXPORT lean_object* l_Lean_RBMap_insert___redArg(lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_instInhabitedRBMap(lean_object*, lean_object*, lean_object*);
lean_object* l_mkPanicMessageWithDecl(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_RBMap_depth___redArg___boxed(lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_RBMap_fold___redArg(lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_RBColor_noConfusion___redArg___lam__0(lean_object*);
LEAN_EXPORT lean_object* l_Lean_RBNode_setRed___redArg(lean_object*);
LEAN_EXPORT lean_object* l_Lean_RBNode_fold___at___00Lean_RBNode_toArray_spec__0___boxed(lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_RBNode_erase(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_RBNode_fold___at___00Lean_RBMap_filter_spec__0___redArg(lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_RBColor_black_elim___redArg(lean_object*);
LEAN_EXPORT lean_object* l_Lean_RBNode_node_elim(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l___private_Lean_Data_RBMap_0__Lean_RBNode_isRed_match__1_splitter(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_RBNode_depth___boxed(lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_RBNode_toArray___redArg___boxed(lean_object*);
LEAN_EXPORT lean_object* l_Lean_RBColor_noConfusion___redArg___lam__0___boxed(lean_object*);
static lean_object* l_Lean_RBMap_fromArray___closed__8;
LEAN_EXPORT lean_object* l_Lean_RBMap_filterMap___redArg(lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_RBNode_foldM(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_RBNode_isSingleton___boxed(lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l___private_Lean_Data_RBMap_0__Lean_RBNode_isRed_match__1_splitter___redArg(lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_RBMap_all___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_RBNode_size(lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_RBNode_ins(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_RBMap_min_x21(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
lean_object* lean_array_get_size(lean_object*);
LEAN_EXPORT lean_object* l_Lean_RBMap_fromArray___lam__0(lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_RBMap_empty(lean_object*, lean_object*, lean_object*);
lean_object* l_Id_instMonad___lam__0(lean_object*, lean_object*, lean_object*, lean_object*);
uint8_t lean_nat_dec_le(lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_RBNode_singleton(lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT uint8_t l_Lean_RBNode_isSingleton(lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_RBNode_foldM___redArg___lam__0(lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_RBNode_isBlack___redArg___boxed(lean_object*);
lean_object* lean_nat_add(lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_RBMap_foldM___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_RBNode_isSingleton___redArg___boxed(lean_object*);
LEAN_EXPORT lean_object* l_Lean_RBNode_balLeft___redArg(lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_RBNode_size___redArg(lean_object*);
LEAN_EXPORT lean_object* l_Lean_RBMap_maxDepth___redArg(lean_object*);
LEAN_EXPORT lean_object* l_Lean_RBNode_map(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_RBMap_instRepr___redArg___lam__0___boxed(lean_object*, lean_object*, lean_object*);
static lean_object* l_Lean_RBMap_find_x21___closed__1;
LEAN_EXPORT lean_object* l_Lean_RBMap_toArray(lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_RBMap_lowerBound___redArg(lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l___private_Lean_Data_RBMap_0__Lean_RBNode_forIn_visit(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_RBColor_noConfusion___boxed(lean_object*, lean_object*, lean_object*, lean_object*);
lean_object* l_Id_instMonad___lam__5___boxed(lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_RBNode_ctorIdx___boxed(lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_RBMap_toArray___redArg(lean_object*);
LEAN_EXPORT lean_object* l_Lean_RBMap_mergeBy(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
static lean_object* l_Lean_RBMap_max_x21___closed__1;
LEAN_EXPORT lean_object* l_Lean_RBMap_intersectBy___redArg(lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_RBNode_ctorElim___redArg(lean_object*, lean_object*);
static lean_object* l_Lean_RBMap_min_x21___closed__1;
LEAN_EXPORT lean_object* l_Lean_RBMap_find_x3f(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_RBMap_revFold___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_RBNode_setBlack(lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_RBNode_fold___at___00Lean_RBMap_size_spec__0___redArg___boxed(lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_RBNode_fold___at___00Lean_RBMap_intersectBy_spec__0___redArg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_RBColor_ctorIdx(uint8_t x_1) {
_start:
{
if (x_1 == 0)
{
lean_object* x_2; 
x_2 = lean_unsigned_to_nat(0u);
return x_2;
}
else
{
lean_object* x_3; 
x_3 = lean_unsigned_to_nat(1u);
return x_3;
}
}
}
LEAN_EXPORT lean_object* l_Lean_RBColor_ctorIdx___boxed(lean_object* x_1) {
_start:
{
uint8_t x_2; lean_object* x_3; 
x_2 = lean_unbox(x_1);
x_3 = l_Lean_RBColor_ctorIdx(x_2);
return x_3;
}
}
LEAN_EXPORT lean_object* l_Lean_RBColor_toCtorIdx(uint8_t x_1) {
_start:
{
lean_object* x_2; 
x_2 = l_Lean_RBColor_ctorIdx(x_1);
return x_2;
}
}
LEAN_EXPORT lean_object* l_Lean_RBColor_toCtorIdx___boxed(lean_object* x_1) {
_start:
{
uint8_t x_2; lean_object* x_3; 
x_2 = lean_unbox(x_1);
x_3 = l_Lean_RBColor_toCtorIdx(x_2);
return x_3;
}
}
LEAN_EXPORT lean_object* l_Lean_RBColor_ctorElim(lean_object* x_1, lean_object* x_2, uint8_t x_3, lean_object* x_4, lean_object* x_5) {
_start:
{
lean_inc(x_5);
return x_5;
}
}
LEAN_EXPORT lean_object* l_Lean_RBColor_ctorElim___redArg(lean_object* x_1) {
_start:
{
lean_inc(x_1);
return x_1;
}
}
LEAN_EXPORT lean_object* l_Lean_RBColor_ctorElim___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) {
_start:
{
uint8_t x_6; lean_object* x_7; 
x_6 = lean_unbox(x_3);
x_7 = l_Lean_RBColor_ctorElim(x_1, x_2, x_6, x_4, x_5);
lean_dec(x_5);
lean_dec(x_2);
return x_7;
}
}
LEAN_EXPORT lean_object* l_Lean_RBColor_ctorElim___redArg___boxed(lean_object* x_1) {
_start:
{
lean_object* x_2; 
x_2 = l_Lean_RBColor_ctorElim___redArg(x_1);
lean_dec(x_1);
return x_2;
}
}
LEAN_EXPORT lean_object* l_Lean_RBColor_red_elim(lean_object* x_1, uint8_t x_2, lean_object* x_3, lean_object* x_4) {
_start:
{
lean_inc(x_4);
return x_4;
}
}
LEAN_EXPORT lean_object* l_Lean_RBColor_red_elim___redArg(lean_object* x_1) {
_start:
{
lean_inc(x_1);
return x_1;
}
}
LEAN_EXPORT lean_object* l_Lean_RBColor_red_elim___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) {
_start:
{
uint8_t x_5; lean_object* x_6; 
x_5 = lean_unbox(x_2);
x_6 = l_Lean_RBColor_red_elim(x_1, x_5, x_3, x_4);
lean_dec(x_4);
return x_6;
}
}
LEAN_EXPORT lean_object* l_Lean_RBColor_red_elim___redArg___boxed(lean_object* x_1) {
_start:
{
lean_object* x_2; 
x_2 = l_Lean_RBColor_red_elim___redArg(x_1);
lean_dec(x_1);
return x_2;
}
}
LEAN_EXPORT lean_object* l_Lean_RBColor_black_elim(lean_object* x_1, uint8_t x_2, lean_object* x_3, lean_object* x_4) {
_start:
{
lean_inc(x_4);
return x_4;
}
}
LEAN_EXPORT lean_object* l_Lean_RBColor_black_elim___redArg(lean_object* x_1) {
_start:
{
lean_inc(x_1);
return x_1;
}
}
LEAN_EXPORT lean_object* l_Lean_RBColor_black_elim___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) {
_start:
{
uint8_t x_5; lean_object* x_6; 
x_5 = lean_unbox(x_2);
x_6 = l_Lean_RBColor_black_elim(x_1, x_5, x_3, x_4);
lean_dec(x_4);
return x_6;
}
}
LEAN_EXPORT lean_object* l_Lean_RBColor_black_elim___redArg___boxed(lean_object* x_1) {
_start:
{
lean_object* x_2; 
x_2 = l_Lean_RBColor_black_elim___redArg(x_1);
lean_dec(x_1);
return x_2;
}
}
LEAN_EXPORT lean_object* l_Lean_RBColor_noConfusion___redArg___lam__0(lean_object* x_1) {
_start:
{
lean_inc(x_1);
return x_1;
}
}
LEAN_EXPORT lean_object* l_Lean_RBColor_noConfusion___redArg___lam__0___boxed(lean_object* x_1) {
_start:
{
lean_object* x_2; 
x_2 = l_Lean_RBColor_noConfusion___redArg___lam__0(x_1);
lean_dec(x_1);
return x_2;
}
}
LEAN_EXPORT lean_object* l_Lean_RBColor_noConfusion___redArg(uint8_t x_1, uint8_t x_2) {
_start:
{
lean_object* x_3; lean_object* x_4; uint8_t x_5; lean_object* x_6; 
x_3 = l_Lean_RBColor_ctorIdx(x_1);
x_4 = l_Lean_RBColor_ctorIdx(x_2);
x_5 = lean_nat_dec_eq(x_3, x_4);
lean_dec(x_4);
lean_dec(x_3);
x_6 = lean_alloc_closure((void*)(l_Lean_RBColor_noConfusion___redArg___lam__0___boxed), 1, 0);
return x_6;
}
}
LEAN_EXPORT lean_object* l_Lean_RBColor_noConfusion(lean_object* x_1, uint8_t x_2, uint8_t x_3, lean_object* x_4) {
_start:
{
lean_object* x_5; 
x_5 = l_Lean_RBColor_noConfusion___redArg(x_2, x_3);
return x_5;
}
}
LEAN_EXPORT lean_object* l_Lean_RBColor_noConfusion___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) {
_start:
{
uint8_t x_5; uint8_t x_6; lean_object* x_7; 
x_5 = lean_unbox(x_2);
x_6 = lean_unbox(x_3);
x_7 = l_Lean_RBColor_noConfusion(x_1, x_5, x_6, x_4);
return x_7;
}
}
LEAN_EXPORT lean_object* l_Lean_RBColor_noConfusion___redArg___boxed(lean_object* x_1, lean_object* x_2) {
_start:
{
uint8_t x_3; uint8_t x_4; lean_object* x_5; 
x_3 = lean_unbox(x_1);
x_4 = lean_unbox(x_2);
x_5 = l_Lean_RBColor_noConfusion___redArg(x_3, x_4);
return x_5;
}
}
LEAN_EXPORT lean_object* l_Lean_RBNode_ctorIdx___redArg(lean_object* x_1) {
_start:
{
if (lean_obj_tag(x_1) == 0)
{
lean_object* x_2; 
x_2 = lean_unsigned_to_nat(0u);
return x_2;
}
else
{
lean_object* x_3; 
x_3 = lean_unsigned_to_nat(1u);
return x_3;
}
}
}
LEAN_EXPORT lean_object* l_Lean_RBNode_ctorIdx(lean_object* x_1, lean_object* x_2, lean_object* x_3) {
_start:
{
lean_object* x_4; 
x_4 = l_Lean_RBNode_ctorIdx___redArg(x_3);
return x_4;
}
}
LEAN_EXPORT lean_object* l_Lean_RBNode_ctorIdx___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) {
_start:
{
lean_object* x_4; 
x_4 = l_Lean_RBNode_ctorIdx(x_1, x_2, x_3);
lean_dec(x_3);
return x_4;
}
}
LEAN_EXPORT lean_object* l_Lean_RBNode_ctorIdx___redArg___boxed(lean_object* x_1) {
_start:
{
lean_object* x_2; 
x_2 = l_Lean_RBNode_ctorIdx___redArg(x_1);
lean_dec(x_1);
return x_2;
}
}
LEAN_EXPORT lean_object* l_Lean_RBNode_ctorElim___redArg(lean_object* x_1, lean_object* x_2) {
_start:
{
if (lean_obj_tag(x_1) == 0)
{
return x_2;
}
else
{
uint8_t x_3; lean_object* x_4; lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; 
x_3 = lean_ctor_get_uint8(x_1, sizeof(void*)*4);
x_4 = lean_ctor_get(x_1, 0);
lean_inc(x_4);
x_5 = lean_ctor_get(x_1, 1);
lean_inc(x_5);
x_6 = lean_ctor_get(x_1, 2);
lean_inc(x_6);
x_7 = lean_ctor_get(x_1, 3);
lean_inc(x_7);
lean_dec_ref(x_1);
x_8 = lean_box(x_3);
x_9 = lean_apply_5(x_2, x_8, x_4, x_5, x_6, x_7);
return x_9;
}
}
}
LEAN_EXPORT lean_object* l_Lean_RBNode_ctorElim(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7) {
_start:
{
lean_object* x_8; 
x_8 = l_Lean_RBNode_ctorElim___redArg(x_5, x_7);
return x_8;
}
}
LEAN_EXPORT lean_object* l_Lean_RBNode_ctorElim___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7) {
_start:
{
lean_object* x_8; 
x_8 = l_Lean_RBNode_ctorElim(x_1, x_2, x_3, x_4, x_5, x_6, x_7);
lean_dec(x_4);
return x_8;
}
}
LEAN_EXPORT lean_object* l_Lean_RBNode_leaf_elim(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6) {
_start:
{
lean_object* x_7; 
x_7 = l_Lean_RBNode_ctorElim___redArg(x_4, x_6);
return x_7;
}
}
LEAN_EXPORT lean_object* l_Lean_RBNode_leaf_elim___redArg(lean_object* x_1, lean_object* x_2) {
_start:
{
lean_object* x_3; 
x_3 = l_Lean_RBNode_ctorElim___redArg(x_1, x_2);
return x_3;
}
}
LEAN_EXPORT lean_object* l_Lean_RBNode_node_elim(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6) {
_start:
{
lean_object* x_7; 
x_7 = l_Lean_RBNode_ctorElim___redArg(x_4, x_6);
return x_7;
}
}
LEAN_EXPORT lean_object* l_Lean_RBNode_node_elim___redArg(lean_object* x_1, lean_object* x_2) {
_start:
{
lean_object* x_3; 
x_3 = l_Lean_RBNode_ctorElim___redArg(x_1, x_2);
return x_3;
}
}
LEAN_EXPORT lean_object* l_Lean_RBNode_depth___redArg(lean_object* x_1, lean_object* x_2) {
_start:
{
if (lean_obj_tag(x_2) == 0)
{
lean_object* x_3; 
lean_dec_ref(x_1);
x_3 = lean_unsigned_to_nat(0u);
return x_3;
}
else
{
lean_object* x_4; lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; 
x_4 = lean_ctor_get(x_2, 0);
x_5 = lean_ctor_get(x_2, 3);
lean_inc_ref(x_1);
x_6 = l_Lean_RBNode_depth___redArg(x_1, x_4);
lean_inc_ref(x_1);
x_7 = l_Lean_RBNode_depth___redArg(x_1, x_5);
x_8 = lean_apply_2(x_1, x_6, x_7);
x_9 = lean_unsigned_to_nat(1u);
x_10 = lean_nat_add(x_8, x_9);
lean_dec(x_8);
return x_10;
}
}
}
LEAN_EXPORT lean_object* l_Lean_RBNode_depth(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) {
_start:
{
lean_object* x_5; 
x_5 = l_Lean_RBNode_depth___redArg(x_3, x_4);
return x_5;
}
}
LEAN_EXPORT lean_object* l_Lean_RBNode_depth___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) {
_start:
{
lean_object* x_5; 
x_5 = l_Lean_RBNode_depth(x_1, x_2, x_3, x_4);
lean_dec(x_4);
return x_5;
}
}
LEAN_EXPORT lean_object* l_Lean_RBNode_depth___redArg___boxed(lean_object* x_1, lean_object* x_2) {
_start:
{
lean_object* x_3; 
x_3 = l_Lean_RBNode_depth___redArg(x_1, x_2);
lean_dec(x_2);
return x_3;
}
}
LEAN_EXPORT lean_object* l_Lean_RBNode_min___redArg(lean_object* x_1) {
_start:
{
if (lean_obj_tag(x_1) == 0)
{
lean_object* x_2; 
x_2 = lean_box(0);
return x_2;
}
else
{
lean_object* x_3; 
x_3 = lean_ctor_get(x_1, 0);
if (lean_obj_tag(x_3) == 0)
{
lean_object* x_4; lean_object* x_5; lean_object* x_6; lean_object* x_7; 
x_4 = lean_ctor_get(x_1, 1);
x_5 = lean_ctor_get(x_1, 2);
lean_inc(x_5);
lean_inc(x_4);
x_6 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_6, 0, x_4);
lean_ctor_set(x_6, 1, x_5);
x_7 = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(x_7, 0, x_6);
return x_7;
}
else
{
x_1 = x_3;
goto _start;
}
}
}
}
LEAN_EXPORT lean_object* l_Lean_RBNode_min(lean_object* x_1, lean_object* x_2, lean_object* x_3) {
_start:
{
lean_object* x_4; 
x_4 = l_Lean_RBNode_min___redArg(x_3);
return x_4;
}
}
LEAN_EXPORT lean_object* l_Lean_RBNode_min___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) {
_start:
{
lean_object* x_4; 
x_4 = l_Lean_RBNode_min(x_1, x_2, x_3);
lean_dec(x_3);
return x_4;
}
}
LEAN_EXPORT lean_object* l_Lean_RBNode_min___redArg___boxed(lean_object* x_1) {
_start:
{
lean_object* x_2; 
x_2 = l_Lean_RBNode_min___redArg(x_1);
lean_dec(x_1);
return x_2;
}
}
LEAN_EXPORT lean_object* l_Lean_RBNode_max___redArg(lean_object* x_1) {
_start:
{
if (lean_obj_tag(x_1) == 0)
{
lean_object* x_2; 
x_2 = lean_box(0);
return x_2;
}
else
{
lean_object* x_3; 
x_3 = lean_ctor_get(x_1, 3);
if (lean_obj_tag(x_3) == 0)
{
lean_object* x_4; lean_object* x_5; lean_object* x_6; lean_object* x_7; 
x_4 = lean_ctor_get(x_1, 1);
x_5 = lean_ctor_get(x_1, 2);
lean_inc(x_5);
lean_inc(x_4);
x_6 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_6, 0, x_4);
lean_ctor_set(x_6, 1, x_5);
x_7 = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(x_7, 0, x_6);
return x_7;
}
else
{
x_1 = x_3;
goto _start;
}
}
}
}
LEAN_EXPORT lean_object* l_Lean_RBNode_max(lean_object* x_1, lean_object* x_2, lean_object* x_3) {
_start:
{
lean_object* x_4; 
x_4 = l_Lean_RBNode_max___redArg(x_3);
return x_4;
}
}
LEAN_EXPORT lean_object* l_Lean_RBNode_max___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) {
_start:
{
lean_object* x_4; 
x_4 = l_Lean_RBNode_max(x_1, x_2, x_3);
lean_dec(x_3);
return x_4;
}
}
LEAN_EXPORT lean_object* l_Lean_RBNode_max___redArg___boxed(lean_object* x_1) {
_start:
{
lean_object* x_2; 
x_2 = l_Lean_RBNode_max___redArg(x_1);
lean_dec(x_1);
return x_2;
}
}
LEAN_EXPORT lean_object* l_Lean_RBNode_fold___redArg(lean_object* x_1, lean_object* x_2, lean_object* x_3) {
_start:
{
if (lean_obj_tag(x_3) == 0)
{
lean_dec(x_1);
return x_2;
}
else
{
lean_object* x_4; lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; 
x_4 = lean_ctor_get(x_3, 0);
lean_inc(x_4);
x_5 = lean_ctor_get(x_3, 1);
lean_inc(x_5);
x_6 = lean_ctor_get(x_3, 2);
lean_inc(x_6);
x_7 = lean_ctor_get(x_3, 3);
lean_inc(x_7);
lean_dec_ref(x_3);
lean_inc(x_1);
x_8 = l_Lean_RBNode_fold___redArg(x_1, x_2, x_4);
lean_inc(x_1);
x_9 = lean_apply_3(x_1, x_8, x_5, x_6);
x_2 = x_9;
x_3 = x_7;
goto _start;
}
}
}
LEAN_EXPORT lean_object* l_Lean_RBNode_fold(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6) {
_start:
{
lean_object* x_7; 
x_7 = l_Lean_RBNode_fold___redArg(x_4, x_5, x_6);
return x_7;
}
}
LEAN_EXPORT lean_object* l_Lean_RBNode_forM___redArg___lam__0(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) {
_start:
{
lean_object* x_5; 
x_5 = l_Lean_RBNode_forM___redArg(x_1, x_2, x_3);
return x_5;
}
}
LEAN_EXPORT lean_object* l_Lean_RBNode_forM___redArg___lam__1(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6) {
_start:
{
lean_object* x_7; lean_object* x_8; 
x_7 = lean_apply_2(x_1, x_2, x_3);
x_8 = lean_apply_4(x_4, lean_box(0), lean_box(0), x_7, x_5);
return x_8;
}
}
LEAN_EXPORT lean_object* l_Lean_RBNode_forM___redArg(lean_object* x_1, lean_object* x_2, lean_object* x_3) {
_start:
{
if (lean_obj_tag(x_3) == 0)
{
lean_object* x_4; lean_object* x_5; lean_object* x_6; lean_object* x_7; 
x_4 = lean_ctor_get(x_1, 0);
lean_inc_ref(x_4);
lean_dec(x_2);
lean_dec_ref(x_1);
x_5 = lean_ctor_get(x_4, 1);
lean_inc(x_5);
lean_dec_ref(x_4);
x_6 = lean_box(0);
x_7 = lean_apply_2(x_5, lean_box(0), x_6);
return x_7;
}
else
{
lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; 
x_8 = lean_ctor_get(x_1, 1);
lean_inc(x_8);
x_9 = lean_ctor_get(x_3, 0);
lean_inc(x_9);
x_10 = lean_ctor_get(x_3, 1);
lean_inc(x_10);
x_11 = lean_ctor_get(x_3, 2);
lean_inc(x_11);
x_12 = lean_ctor_get(x_3, 3);
lean_inc(x_12);
lean_dec_ref(x_3);
lean_inc(x_2);
lean_inc_ref(x_1);
x_13 = lean_alloc_closure((void*)(l_Lean_RBNode_forM___redArg___lam__0), 4, 3);
lean_closure_set(x_13, 0, x_1);
lean_closure_set(x_13, 1, x_2);
lean_closure_set(x_13, 2, x_12);
lean_inc(x_8);
lean_inc(x_2);
x_14 = lean_alloc_closure((void*)(l_Lean_RBNode_forM___redArg___lam__1), 6, 5);
lean_closure_set(x_14, 0, x_2);
lean_closure_set(x_14, 1, x_10);
lean_closure_set(x_14, 2, x_11);
lean_closure_set(x_14, 3, x_8);
lean_closure_set(x_14, 4, x_13);
x_15 = l_Lean_RBNode_forM___redArg(x_1, x_2, x_9);
x_16 = lean_apply_4(x_8, lean_box(0), lean_box(0), x_15, x_14);
return x_16;
}
}
}
LEAN_EXPORT lean_object* l_Lean_RBNode_forM(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6) {
_start:
{
lean_object* x_7; 
x_7 = l_Lean_RBNode_forM___redArg(x_4, x_5, x_6);
return x_7;
}
}
LEAN_EXPORT lean_object* l_Lean_RBNode_foldM___redArg___lam__0(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) {
_start:
{
lean_object* x_5; 
x_5 = l_Lean_RBNode_foldM___redArg(x_1, x_2, x_4, x_3);
return x_5;
}
}
LEAN_EXPORT lean_object* l_Lean_RBNode_foldM___redArg___lam__1(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6) {
_start:
{
lean_object* x_7; lean_object* x_8; 
x_7 = lean_apply_3(x_1, x_6, x_2, x_3);
x_8 = lean_apply_4(x_4, lean_box(0), lean_box(0), x_7, x_5);
return x_8;
}
}
LEAN_EXPORT lean_object* l_Lean_RBNode_foldM___redArg(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) {
_start:
{
if (lean_obj_tag(x_4) == 0)
{
lean_object* x_5; lean_object* x_6; lean_object* x_7; 
x_5 = lean_ctor_get(x_1, 0);
lean_inc_ref(x_5);
lean_dec(x_2);
lean_dec_ref(x_1);
x_6 = lean_ctor_get(x_5, 1);
lean_inc(x_6);
lean_dec_ref(x_5);
x_7 = lean_apply_2(x_6, lean_box(0), x_3);
return x_7;
}
else
{
lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; 
x_8 = lean_ctor_get(x_1, 1);
lean_inc(x_8);
x_9 = lean_ctor_get(x_4, 0);
lean_inc(x_9);
x_10 = lean_ctor_get(x_4, 1);
lean_inc(x_10);
x_11 = lean_ctor_get(x_4, 2);
lean_inc(x_11);
x_12 = lean_ctor_get(x_4, 3);
lean_inc(x_12);
lean_dec_ref(x_4);
lean_inc(x_2);
lean_inc_ref(x_1);
x_13 = lean_alloc_closure((void*)(l_Lean_RBNode_foldM___redArg___lam__0), 4, 3);
lean_closure_set(x_13, 0, x_1);
lean_closure_set(x_13, 1, x_2);
lean_closure_set(x_13, 2, x_12);
lean_inc(x_8);
lean_inc(x_2);
x_14 = lean_alloc_closure((void*)(l_Lean_RBNode_foldM___redArg___lam__1), 6, 5);
lean_closure_set(x_14, 0, x_2);
lean_closure_set(x_14, 1, x_10);
lean_closure_set(x_14, 2, x_11);
lean_closure_set(x_14, 3, x_8);
lean_closure_set(x_14, 4, x_13);
x_15 = l_Lean_RBNode_foldM___redArg(x_1, x_2, x_3, x_9);
x_16 = lean_apply_4(x_8, lean_box(0), lean_box(0), x_15, x_14);
return x_16;
}
}
}
LEAN_EXPORT lean_object* l_Lean_RBNode_foldM(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8) {
_start:
{
lean_object* x_9; 
x_9 = l_Lean_RBNode_foldM___redArg(x_5, x_6, x_7, x_8);
return x_9;
}
}
LEAN_EXPORT lean_object* l___private_Lean_Data_RBMap_0__Lean_RBNode_forIn_visit___redArg___lam__0(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) {
_start:
{
if (lean_obj_tag(x_5) == 0)
{
lean_object* x_6; 
lean_dec(x_4);
lean_dec(x_3);
lean_dec_ref(x_2);
x_6 = lean_apply_2(x_1, lean_box(0), x_5);
return x_6;
}
else
{
lean_object* x_7; lean_object* x_8; 
lean_dec(x_1);
x_7 = lean_ctor_get(x_5, 0);
lean_inc(x_7);
lean_dec_ref(x_5);
x_8 = l___private_Lean_Data_RBMap_0__Lean_RBNode_forIn_visit___redArg(x_2, x_3, x_4, x_7);
return x_8;
}
}
}
LEAN_EXPORT lean_object* l___private_Lean_Data_RBMap_0__Lean_RBNode_forIn_visit___redArg___lam__1(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7) {
_start:
{
if (lean_obj_tag(x_7) == 0)
{
lean_object* x_8; 
lean_dec(x_6);
lean_dec(x_5);
lean_dec(x_4);
lean_dec(x_3);
lean_dec(x_2);
x_8 = lean_apply_2(x_1, lean_box(0), x_7);
return x_8;
}
else
{
lean_object* x_9; lean_object* x_10; lean_object* x_11; 
lean_dec(x_1);
x_9 = lean_ctor_get(x_7, 0);
lean_inc(x_9);
lean_dec_ref(x_7);
x_10 = lean_apply_3(x_2, x_3, x_4, x_9);
x_11 = lean_apply_4(x_5, lean_box(0), lean_box(0), x_10, x_6);
return x_11;
}
}
}
LEAN_EXPORT lean_object* l___private_Lean_Data_RBMap_0__Lean_RBNode_forIn_visit___redArg(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) {
_start:
{
if (lean_obj_tag(x_3) == 0)
{
lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; 
x_5 = lean_ctor_get(x_1, 0);
lean_inc_ref(x_5);
lean_dec(x_2);
lean_dec_ref(x_1);
x_6 = lean_ctor_get(x_5, 1);
lean_inc(x_6);
lean_dec_ref(x_5);
x_7 = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(x_7, 0, x_4);
x_8 = lean_apply_2(x_6, lean_box(0), x_7);
return x_8;
}
else
{
lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; 
x_9 = lean_ctor_get(x_1, 0);
x_10 = lean_ctor_get(x_1, 1);
lean_inc(x_10);
x_11 = lean_ctor_get(x_9, 1);
x_12 = lean_ctor_get(x_3, 0);
lean_inc(x_12);
x_13 = lean_ctor_get(x_3, 1);
lean_inc(x_13);
x_14 = lean_ctor_get(x_3, 2);
lean_inc(x_14);
x_15 = lean_ctor_get(x_3, 3);
lean_inc(x_15);
lean_dec_ref(x_3);
lean_inc(x_2);
lean_inc_ref(x_1);
lean_inc(x_11);
x_16 = lean_alloc_closure((void*)(l___private_Lean_Data_RBMap_0__Lean_RBNode_forIn_visit___redArg___lam__0), 5, 4);
lean_closure_set(x_16, 0, x_11);
lean_closure_set(x_16, 1, x_1);
lean_closure_set(x_16, 2, x_2);
lean_closure_set(x_16, 3, x_15);
lean_inc(x_10);
lean_inc(x_2);
lean_inc(x_11);
x_17 = lean_alloc_closure((void*)(l___private_Lean_Data_RBMap_0__Lean_RBNode_forIn_visit___redArg___lam__1), 7, 6);
lean_closure_set(x_17, 0, x_11);
lean_closure_set(x_17, 1, x_2);
lean_closure_set(x_17, 2, x_13);
lean_closure_set(x_17, 3, x_14);
lean_closure_set(x_17, 4, x_10);
lean_closure_set(x_17, 5, x_16);
x_18 = l___private_Lean_Data_RBMap_0__Lean_RBNode_forIn_visit___redArg(x_1, x_2, x_12, x_4);
x_19 = lean_apply_4(x_10, lean_box(0), lean_box(0), x_18, x_17);
return x_19;
}
}
}
LEAN_EXPORT lean_object* l___private_Lean_Data_RBMap_0__Lean_RBNode_forIn_visit(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8) {
_start:
{
lean_object* x_9; 
x_9 = l___private_Lean_Data_RBMap_0__Lean_RBNode_forIn_visit___redArg(x_5, x_6, x_7, x_8);
return x_9;
}
}
LEAN_EXPORT lean_object* l_Lean_RBNode_forIn___lam__0(lean_object* x_1, lean_object* x_2) {
_start:
{
lean_object* x_3; lean_object* x_4; 
x_3 = lean_ctor_get(x_2, 0);
lean_inc(x_3);
lean_dec_ref(x_2);
x_4 = lean_apply_2(x_1, lean_box(0), x_3);
return x_4;
}
}
LEAN_EXPORT lean_object* l_Lean_RBNode_forIn(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8) {
_start:
{
lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; 
x_9 = lean_ctor_get(x_5, 0);
x_10 = lean_ctor_get(x_5, 1);
lean_inc(x_10);
x_11 = lean_ctor_get(x_9, 1);
lean_inc(x_11);
x_12 = l___private_Lean_Data_RBMap_0__Lean_RBNode_forIn_visit___redArg(x_5, x_8, x_6, x_7);
x_13 = lean_alloc_closure((void*)(l_Lean_RBNode_forIn___lam__0), 2, 1);
lean_closure_set(x_13, 0, x_11);
x_14 = lean_apply_4(x_10, lean_box(0), lean_box(0), x_12, x_13);
return x_14;
}
}
LEAN_EXPORT lean_object* l_Lean_RBNode_forIn___redArg(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) {
_start:
{
lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; 
x_5 = lean_ctor_get(x_1, 0);
x_6 = lean_ctor_get(x_1, 1);
lean_inc(x_6);
x_7 = lean_ctor_get(x_5, 1);
lean_inc(x_7);
x_8 = l___private_Lean_Data_RBMap_0__Lean_RBNode_forIn_visit___redArg(x_1, x_4, x_2, x_3);
x_9 = lean_alloc_closure((void*)(l_Lean_RBNode_forIn___lam__0), 2, 1);
lean_closure_set(x_9, 0, x_7);
x_10 = lean_apply_4(x_6, lean_box(0), lean_box(0), x_8, x_9);
return x_10;
}
}
LEAN_EXPORT lean_object* l_Lean_RBNode_revFold___redArg(lean_object* x_1, lean_object* x_2, lean_object* x_3) {
_start:
{
if (lean_obj_tag(x_3) == 0)
{
lean_dec(x_1);
return x_2;
}
else
{
lean_object* x_4; lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; 
x_4 = lean_ctor_get(x_3, 0);
lean_inc(x_4);
x_5 = lean_ctor_get(x_3, 1);
lean_inc(x_5);
x_6 = lean_ctor_get(x_3, 2);
lean_inc(x_6);
x_7 = lean_ctor_get(x_3, 3);
lean_inc(x_7);
lean_dec_ref(x_3);
lean_inc(x_1);
x_8 = l_Lean_RBNode_revFold___redArg(x_1, x_2, x_7);
lean_inc(x_1);
x_9 = lean_apply_3(x_1, x_8, x_5, x_6);
x_2 = x_9;
x_3 = x_4;
goto _start;
}
}
}
LEAN_EXPORT lean_object* l_Lean_RBNode_revFold(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6) {
_start:
{
lean_object* x_7; 
x_7 = l_Lean_RBNode_revFold___redArg(x_4, x_5, x_6);
return x_7;
}
}
LEAN_EXPORT uint8_t l_Lean_RBNode_all___redArg(lean_object* x_1, lean_object* x_2) {
_start:
{
if (lean_obj_tag(x_2) == 0)
{
uint8_t x_3; 
lean_dec_ref(x_1);
x_3 = 1;
return x_3;
}
else
{
lean_object* x_4; lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; uint8_t x_9; 
x_4 = lean_ctor_get(x_2, 0);
lean_inc(x_4);
x_5 = lean_ctor_get(x_2, 1);
lean_inc(x_5);
x_6 = lean_ctor_get(x_2, 2);
lean_inc(x_6);
x_7 = lean_ctor_get(x_2, 3);
lean_inc(x_7);
lean_dec_ref(x_2);
lean_inc_ref(x_1);
x_8 = lean_apply_2(x_1, x_5, x_6);
x_9 = lean_unbox(x_8);
if (x_9 == 0)
{
uint8_t x_10; 
lean_dec(x_7);
lean_dec(x_4);
lean_dec_ref(x_1);
x_10 = lean_unbox(x_8);
return x_10;
}
else
{
uint8_t x_11; 
lean_inc_ref(x_1);
x_11 = l_Lean_RBNode_all___redArg(x_1, x_4);
if (x_11 == 0)
{
lean_dec(x_7);
lean_dec_ref(x_1);
return x_11;
}
else
{
x_2 = x_7;
goto _start;
}
}
}
}
}
LEAN_EXPORT uint8_t l_Lean_RBNode_all(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) {
_start:
{
uint8_t x_5; 
x_5 = l_Lean_RBNode_all___redArg(x_3, x_4);
return x_5;
}
}
LEAN_EXPORT lean_object* l_Lean_RBNode_all___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) {
_start:
{
uint8_t x_5; lean_object* x_6; 
x_5 = l_Lean_RBNode_all(x_1, x_2, x_3, x_4);
x_6 = lean_box(x_5);
return x_6;
}
}
LEAN_EXPORT lean_object* l_Lean_RBNode_all___redArg___boxed(lean_object* x_1, lean_object* x_2) {
_start:
{
uint8_t x_3; lean_object* x_4; 
x_3 = l_Lean_RBNode_all___redArg(x_1, x_2);
x_4 = lean_box(x_3);
return x_4;
}
}
LEAN_EXPORT uint8_t l_Lean_RBNode_any___redArg(lean_object* x_1, lean_object* x_2) {
_start:
{
if (lean_obj_tag(x_2) == 0)
{
uint8_t x_3; 
lean_dec_ref(x_1);
x_3 = 0;
return x_3;
}
else
{
lean_object* x_4; lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; uint8_t x_9; 
x_4 = lean_ctor_get(x_2, 0);
lean_inc(x_4);
x_5 = lean_ctor_get(x_2, 1);
lean_inc(x_5);
x_6 = lean_ctor_get(x_2, 2);
lean_inc(x_6);
x_7 = lean_ctor_get(x_2, 3);
lean_inc(x_7);
lean_dec_ref(x_2);
lean_inc_ref(x_1);
x_8 = lean_apply_2(x_1, x_5, x_6);
x_9 = lean_unbox(x_8);
if (x_9 == 0)
{
uint8_t x_10; 
lean_inc_ref(x_1);
x_10 = l_Lean_RBNode_any___redArg(x_1, x_4);
if (x_10 == 0)
{
x_2 = x_7;
goto _start;
}
else
{
lean_dec(x_7);
lean_dec_ref(x_1);
return x_10;
}
}
else
{
uint8_t x_12; 
lean_dec(x_7);
lean_dec(x_4);
lean_dec_ref(x_1);
x_12 = lean_unbox(x_8);
return x_12;
}
}
}
}
LEAN_EXPORT uint8_t l_Lean_RBNode_any(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) {
_start:
{
uint8_t x_5; 
x_5 = l_Lean_RBNode_any___redArg(x_3, x_4);
return x_5;
}
}
LEAN_EXPORT lean_object* l_Lean_RBNode_any___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) {
_start:
{
uint8_t x_5; lean_object* x_6; 
x_5 = l_Lean_RBNode_any(x_1, x_2, x_3, x_4);
x_6 = lean_box(x_5);
return x_6;
}
}
LEAN_EXPORT lean_object* l_Lean_RBNode_any___redArg___boxed(lean_object* x_1, lean_object* x_2) {
_start:
{
uint8_t x_3; lean_object* x_4; 
x_3 = l_Lean_RBNode_any___redArg(x_1, x_2);
x_4 = lean_box(x_3);
return x_4;
}
}
LEAN_EXPORT lean_object* l_Lean_RBNode_singleton___redArg(lean_object* x_1, lean_object* x_2) {
_start:
{
uint8_t x_3; lean_object* x_4; lean_object* x_5; 
x_3 = 0;
x_4 = lean_box(0);
x_5 = lean_alloc_ctor(1, 4, 1);
lean_ctor_set(x_5, 0, x_4);
lean_ctor_set(x_5, 1, x_1);
lean_ctor_set(x_5, 2, x_2);
lean_ctor_set(x_5, 3, x_4);
lean_ctor_set_uint8(x_5, sizeof(void*)*4, x_3);
return x_5;
}
}
LEAN_EXPORT lean_object* l_Lean_RBNode_singleton(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) {
_start:
{
lean_object* x_5; 
x_5 = l_Lean_RBNode_singleton___redArg(x_3, x_4);
return x_5;
}
}
LEAN_EXPORT uint8_t l_Lean_RBNode_isSingleton___redArg(lean_object* x_1) {
_start:
{
if (lean_obj_tag(x_1) == 1)
{
lean_object* x_2; 
x_2 = lean_ctor_get(x_1, 0);
if (lean_obj_tag(x_2) == 0)
{
lean_object* x_3; 
x_3 = lean_ctor_get(x_1, 3);
if (lean_obj_tag(x_3) == 0)
{
uint8_t x_4; 
x_4 = 1;
return x_4;
}
else
{
uint8_t x_5; 
x_5 = 0;
return x_5;
}
}
else
{
uint8_t x_6; 
x_6 = 0;
return x_6;
}
}
else
{
uint8_t x_7; 
x_7 = 0;
return x_7;
}
}
}
LEAN_EXPORT uint8_t l_Lean_RBNode_isSingleton(lean_object* x_1, lean_object* x_2, lean_object* x_3) {
_start:
{
uint8_t x_4; 
x_4 = l_Lean_RBNode_isSingleton___redArg(x_3);
return x_4;
}
}
LEAN_EXPORT lean_object* l_Lean_RBNode_isSingleton___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) {
_start:
{
uint8_t x_4; lean_object* x_5; 
x_4 = l_Lean_RBNode_isSingleton(x_1, x_2, x_3);
lean_dec(x_3);
x_5 = lean_box(x_4);
return x_5;
}
}
LEAN_EXPORT lean_object* l_Lean_RBNode_isSingleton___redArg___boxed(lean_object* x_1) {
_start:
{
uint8_t x_2; lean_object* x_3; 
x_2 = l_Lean_RBNode_isSingleton___redArg(x_1);
lean_dec(x_1);
x_3 = lean_box(x_2);
return x_3;
}
}
LEAN_EXPORT lean_object* l_Lean_RBNode_balance1(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6) {
_start:
{
lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; 
if (lean_obj_tag(x_3) == 1)
{
uint8_t x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; lean_object* x_21; lean_object* x_22; lean_object* x_23; lean_object* x_24; lean_object* x_25; lean_object* x_26; lean_object* x_27; lean_object* x_28; 
x_14 = lean_ctor_get_uint8(x_3, sizeof(void*)*4);
x_15 = lean_ctor_get(x_3, 0);
x_16 = lean_ctor_get(x_3, 1);
x_17 = lean_ctor_get(x_3, 2);
x_18 = lean_ctor_get(x_3, 3);
if (x_14 == 0)
{
if (lean_obj_tag(x_15) == 1)
{
uint8_t x_34; 
x_34 = lean_ctor_get_uint8(x_15, sizeof(void*)*4);
if (x_34 == 0)
{
lean_object* x_35; lean_object* x_36; lean_object* x_37; lean_object* x_38; 
lean_inc(x_18);
lean_inc(x_17);
lean_inc(x_16);
lean_inc_ref(x_15);
lean_dec_ref(x_3);
x_35 = lean_ctor_get(x_15, 0);
lean_inc(x_35);
x_36 = lean_ctor_get(x_15, 1);
lean_inc(x_36);
x_37 = lean_ctor_get(x_15, 2);
lean_inc(x_37);
x_38 = lean_ctor_get(x_15, 3);
lean_inc(x_38);
lean_dec_ref(x_15);
x_19 = x_35;
x_20 = x_36;
x_21 = x_37;
x_22 = x_38;
x_23 = x_16;
x_24 = x_17;
x_25 = x_18;
x_26 = x_4;
x_27 = x_5;
x_28 = x_6;
goto block_33;
}
else
{
if (lean_obj_tag(x_18) == 1)
{
uint8_t x_39; 
x_39 = lean_ctor_get_uint8(x_18, sizeof(void*)*4);
if (x_39 == 0)
{
lean_object* x_40; lean_object* x_41; lean_object* x_42; lean_object* x_43; 
lean_inc_ref(x_18);
lean_inc(x_17);
lean_inc(x_16);
lean_inc_ref(x_15);
lean_dec_ref(x_3);
x_40 = lean_ctor_get(x_18, 0);
lean_inc(x_40);
x_41 = lean_ctor_get(x_18, 1);
lean_inc(x_41);
x_42 = lean_ctor_get(x_18, 2);
lean_inc(x_42);
x_43 = lean_ctor_get(x_18, 3);
lean_inc(x_43);
lean_dec_ref(x_18);
x_19 = x_15;
x_20 = x_16;
x_21 = x_17;
x_22 = x_40;
x_23 = x_41;
x_24 = x_42;
x_25 = x_43;
x_26 = x_4;
x_27 = x_5;
x_28 = x_6;
goto block_33;
}
else
{
x_7 = x_3;
x_8 = x_4;
x_9 = x_5;
x_10 = x_6;
goto block_13;
}
}
else
{
x_7 = x_3;
x_8 = x_4;
x_9 = x_5;
x_10 = x_6;
goto block_13;
}
}
}
else
{
if (lean_obj_tag(x_18) == 1)
{
uint8_t x_44; 
x_44 = lean_ctor_get_uint8(x_18, sizeof(void*)*4);
if (x_44 == 0)
{
lean_object* x_45; lean_object* x_46; lean_object* x_47; lean_object* x_48; 
lean_inc_ref(x_18);
lean_inc(x_17);
lean_inc(x_16);
lean_inc(x_15);
lean_dec_ref(x_3);
x_45 = lean_ctor_get(x_18, 0);
lean_inc(x_45);
x_46 = lean_ctor_get(x_18, 1);
lean_inc(x_46);
x_47 = lean_ctor_get(x_18, 2);
lean_inc(x_47);
x_48 = lean_ctor_get(x_18, 3);
lean_inc(x_48);
lean_dec_ref(x_18);
x_19 = x_15;
x_20 = x_16;
x_21 = x_17;
x_22 = x_45;
x_23 = x_46;
x_24 = x_47;
x_25 = x_48;
x_26 = x_4;
x_27 = x_5;
x_28 = x_6;
goto block_33;
}
else
{
x_7 = x_3;
x_8 = x_4;
x_9 = x_5;
x_10 = x_6;
goto block_13;
}
}
else
{
x_7 = x_3;
x_8 = x_4;
x_9 = x_5;
x_10 = x_6;
goto block_13;
}
}
}
else
{
x_7 = x_3;
x_8 = x_4;
x_9 = x_5;
x_10 = x_6;
goto block_13;
}
block_33:
{
uint8_t x_29; lean_object* x_30; lean_object* x_31; lean_object* x_32; 
x_29 = 1;
x_30 = lean_alloc_ctor(1, 4, 1);
lean_ctor_set(x_30, 0, x_19);
lean_ctor_set(x_30, 1, x_20);
lean_ctor_set(x_30, 2, x_21);
lean_ctor_set(x_30, 3, x_22);
lean_ctor_set_uint8(x_30, sizeof(void*)*4, x_29);
x_31 = lean_alloc_ctor(1, 4, 1);
lean_ctor_set(x_31, 0, x_25);
lean_ctor_set(x_31, 1, x_26);
lean_ctor_set(x_31, 2, x_27);
lean_ctor_set(x_31, 3, x_28);
lean_ctor_set_uint8(x_31, sizeof(void*)*4, x_29);
x_32 = lean_alloc_ctor(1, 4, 1);
lean_ctor_set(x_32, 0, x_30);
lean_ctor_set(x_32, 1, x_23);
lean_ctor_set(x_32, 2, x_24);
lean_ctor_set(x_32, 3, x_31);
lean_ctor_set_uint8(x_32, sizeof(void*)*4, x_14);
return x_32;
}
}
else
{
x_7 = x_3;
x_8 = x_4;
x_9 = x_5;
x_10 = x_6;
goto block_13;
}
block_13:
{
uint8_t x_11; lean_object* x_12; 
x_11 = 1;
x_12 = lean_alloc_ctor(1, 4, 1);
lean_ctor_set(x_12, 0, x_7);
lean_ctor_set(x_12, 1, x_8);
lean_ctor_set(x_12, 2, x_9);
lean_ctor_set(x_12, 3, x_10);
lean_ctor_set_uint8(x_12, sizeof(void*)*4, x_11);
return x_12;
}
}
}
LEAN_EXPORT lean_object* l_Lean_RBNode_balance1___redArg(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) {
_start:
{
lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; 
if (lean_obj_tag(x_1) == 1)
{
uint8_t x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; lean_object* x_21; lean_object* x_22; lean_object* x_23; lean_object* x_24; lean_object* x_25; lean_object* x_26; 
x_12 = lean_ctor_get_uint8(x_1, sizeof(void*)*4);
x_13 = lean_ctor_get(x_1, 0);
x_14 = lean_ctor_get(x_1, 1);
x_15 = lean_ctor_get(x_1, 2);
x_16 = lean_ctor_get(x_1, 3);
if (x_12 == 0)
{
if (lean_obj_tag(x_13) == 1)
{
uint8_t x_32; 
x_32 = lean_ctor_get_uint8(x_13, sizeof(void*)*4);
if (x_32 == 0)
{
lean_object* x_33; lean_object* x_34; lean_object* x_35; lean_object* x_36; 
lean_inc(x_16);
lean_inc(x_15);
lean_inc(x_14);
lean_inc_ref(x_13);
lean_dec_ref(x_1);
x_33 = lean_ctor_get(x_13, 0);
lean_inc(x_33);
x_34 = lean_ctor_get(x_13, 1);
lean_inc(x_34);
x_35 = lean_ctor_get(x_13, 2);
lean_inc(x_35);
x_36 = lean_ctor_get(x_13, 3);
lean_inc(x_36);
lean_dec_ref(x_13);
x_17 = x_33;
x_18 = x_34;
x_19 = x_35;
x_20 = x_36;
x_21 = x_14;
x_22 = x_15;
x_23 = x_16;
x_24 = x_2;
x_25 = x_3;
x_26 = x_4;
goto block_31;
}
else
{
if (lean_obj_tag(x_16) == 1)
{
uint8_t x_37; 
x_37 = lean_ctor_get_uint8(x_16, sizeof(void*)*4);
if (x_37 == 0)
{
lean_object* x_38; lean_object* x_39; lean_object* x_40; lean_object* x_41; 
lean_inc_ref(x_16);
lean_inc(x_15);
lean_inc(x_14);
lean_inc_ref(x_13);
lean_dec_ref(x_1);
x_38 = lean_ctor_get(x_16, 0);
lean_inc(x_38);
x_39 = lean_ctor_get(x_16, 1);
lean_inc(x_39);
x_40 = lean_ctor_get(x_16, 2);
lean_inc(x_40);
x_41 = lean_ctor_get(x_16, 3);
lean_inc(x_41);
lean_dec_ref(x_16);
x_17 = x_13;
x_18 = x_14;
x_19 = x_15;
x_20 = x_38;
x_21 = x_39;
x_22 = x_40;
x_23 = x_41;
x_24 = x_2;
x_25 = x_3;
x_26 = x_4;
goto block_31;
}
else
{
x_5 = x_1;
x_6 = x_2;
x_7 = x_3;
x_8 = x_4;
goto block_11;
}
}
else
{
x_5 = x_1;
x_6 = x_2;
x_7 = x_3;
x_8 = x_4;
goto block_11;
}
}
}
else
{
if (lean_obj_tag(x_16) == 1)
{
uint8_t x_42; 
x_42 = lean_ctor_get_uint8(x_16, sizeof(void*)*4);
if (x_42 == 0)
{
lean_object* x_43; lean_object* x_44; lean_object* x_45; lean_object* x_46; 
lean_inc_ref(x_16);
lean_inc(x_15);
lean_inc(x_14);
lean_inc(x_13);
lean_dec_ref(x_1);
x_43 = lean_ctor_get(x_16, 0);
lean_inc(x_43);
x_44 = lean_ctor_get(x_16, 1);
lean_inc(x_44);
x_45 = lean_ctor_get(x_16, 2);
lean_inc(x_45);
x_46 = lean_ctor_get(x_16, 3);
lean_inc(x_46);
lean_dec_ref(x_16);
x_17 = x_13;
x_18 = x_14;
x_19 = x_15;
x_20 = x_43;
x_21 = x_44;
x_22 = x_45;
x_23 = x_46;
x_24 = x_2;
x_25 = x_3;
x_26 = x_4;
goto block_31;
}
else
{
x_5 = x_1;
x_6 = x_2;
x_7 = x_3;
x_8 = x_4;
goto block_11;
}
}
else
{
x_5 = x_1;
x_6 = x_2;
x_7 = x_3;
x_8 = x_4;
goto block_11;
}
}
}
else
{
x_5 = x_1;
x_6 = x_2;
x_7 = x_3;
x_8 = x_4;
goto block_11;
}
block_31:
{
uint8_t x_27; lean_object* x_28; lean_object* x_29; lean_object* x_30; 
x_27 = 1;
x_28 = lean_alloc_ctor(1, 4, 1);
lean_ctor_set(x_28, 0, x_17);
lean_ctor_set(x_28, 1, x_18);
lean_ctor_set(x_28, 2, x_19);
lean_ctor_set(x_28, 3, x_20);
lean_ctor_set_uint8(x_28, sizeof(void*)*4, x_27);
x_29 = lean_alloc_ctor(1, 4, 1);
lean_ctor_set(x_29, 0, x_23);
lean_ctor_set(x_29, 1, x_24);
lean_ctor_set(x_29, 2, x_25);
lean_ctor_set(x_29, 3, x_26);
lean_ctor_set_uint8(x_29, sizeof(void*)*4, x_27);
x_30 = lean_alloc_ctor(1, 4, 1);
lean_ctor_set(x_30, 0, x_28);
lean_ctor_set(x_30, 1, x_21);
lean_ctor_set(x_30, 2, x_22);
lean_ctor_set(x_30, 3, x_29);
lean_ctor_set_uint8(x_30, sizeof(void*)*4, x_12);
return x_30;
}
}
else
{
x_5 = x_1;
x_6 = x_2;
x_7 = x_3;
x_8 = x_4;
goto block_11;
}
block_11:
{
uint8_t x_9; lean_object* x_10; 
x_9 = 1;
x_10 = lean_alloc_ctor(1, 4, 1);
lean_ctor_set(x_10, 0, x_5);
lean_ctor_set(x_10, 1, x_6);
lean_ctor_set(x_10, 2, x_7);
lean_ctor_set(x_10, 3, x_8);
lean_ctor_set_uint8(x_10, sizeof(void*)*4, x_9);
return x_10;
}
}
}
LEAN_EXPORT lean_object* l_Lean_RBNode_balance2(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6) {
_start:
{
lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; 
if (lean_obj_tag(x_6) == 1)
{
uint8_t x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; lean_object* x_21; lean_object* x_22; lean_object* x_23; lean_object* x_24; lean_object* x_25; lean_object* x_26; lean_object* x_27; lean_object* x_28; 
x_14 = lean_ctor_get_uint8(x_6, sizeof(void*)*4);
x_15 = lean_ctor_get(x_6, 0);
x_16 = lean_ctor_get(x_6, 1);
x_17 = lean_ctor_get(x_6, 2);
x_18 = lean_ctor_get(x_6, 3);
if (x_14 == 0)
{
if (lean_obj_tag(x_15) == 1)
{
uint8_t x_34; 
x_34 = lean_ctor_get_uint8(x_15, sizeof(void*)*4);
if (x_34 == 0)
{
lean_object* x_35; lean_object* x_36; lean_object* x_37; lean_object* x_38; 
lean_inc(x_18);
lean_inc(x_17);
lean_inc(x_16);
lean_inc_ref(x_15);
lean_dec_ref(x_6);
x_35 = lean_ctor_get(x_15, 0);
lean_inc(x_35);
x_36 = lean_ctor_get(x_15, 1);
lean_inc(x_36);
x_37 = lean_ctor_get(x_15, 2);
lean_inc(x_37);
x_38 = lean_ctor_get(x_15, 3);
lean_inc(x_38);
lean_dec_ref(x_15);
x_19 = x_3;
x_20 = x_4;
x_21 = x_5;
x_22 = x_35;
x_23 = x_36;
x_24 = x_37;
x_25 = x_38;
x_26 = x_16;
x_27 = x_17;
x_28 = x_18;
goto block_33;
}
else
{
if (lean_obj_tag(x_18) == 1)
{
uint8_t x_39; 
x_39 = lean_ctor_get_uint8(x_18, sizeof(void*)*4);
if (x_39 == 0)
{
lean_object* x_40; lean_object* x_41; lean_object* x_42; lean_object* x_43; 
lean_inc_ref(x_18);
lean_inc(x_17);
lean_inc(x_16);
lean_inc_ref(x_15);
lean_dec_ref(x_6);
x_40 = lean_ctor_get(x_18, 0);
lean_inc(x_40);
x_41 = lean_ctor_get(x_18, 1);
lean_inc(x_41);
x_42 = lean_ctor_get(x_18, 2);
lean_inc(x_42);
x_43 = lean_ctor_get(x_18, 3);
lean_inc(x_43);
lean_dec_ref(x_18);
x_19 = x_3;
x_20 = x_4;
x_21 = x_5;
x_22 = x_15;
x_23 = x_16;
x_24 = x_17;
x_25 = x_40;
x_26 = x_41;
x_27 = x_42;
x_28 = x_43;
goto block_33;
}
else
{
x_7 = x_3;
x_8 = x_4;
x_9 = x_5;
x_10 = x_6;
goto block_13;
}
}
else
{
x_7 = x_3;
x_8 = x_4;
x_9 = x_5;
x_10 = x_6;
goto block_13;
}
}
}
else
{
if (lean_obj_tag(x_18) == 1)
{
uint8_t x_44; 
x_44 = lean_ctor_get_uint8(x_18, sizeof(void*)*4);
if (x_44 == 0)
{
lean_object* x_45; lean_object* x_46; lean_object* x_47; lean_object* x_48; 
lean_inc_ref(x_18);
lean_inc(x_17);
lean_inc(x_16);
lean_inc(x_15);
lean_dec_ref(x_6);
x_45 = lean_ctor_get(x_18, 0);
lean_inc(x_45);
x_46 = lean_ctor_get(x_18, 1);
lean_inc(x_46);
x_47 = lean_ctor_get(x_18, 2);
lean_inc(x_47);
x_48 = lean_ctor_get(x_18, 3);
lean_inc(x_48);
lean_dec_ref(x_18);
x_19 = x_3;
x_20 = x_4;
x_21 = x_5;
x_22 = x_15;
x_23 = x_16;
x_24 = x_17;
x_25 = x_45;
x_26 = x_46;
x_27 = x_47;
x_28 = x_48;
goto block_33;
}
else
{
x_7 = x_3;
x_8 = x_4;
x_9 = x_5;
x_10 = x_6;
goto block_13;
}
}
else
{
x_7 = x_3;
x_8 = x_4;
x_9 = x_5;
x_10 = x_6;
goto block_13;
}
}
}
else
{
x_7 = x_3;
x_8 = x_4;
x_9 = x_5;
x_10 = x_6;
goto block_13;
}
block_33:
{
uint8_t x_29; lean_object* x_30; lean_object* x_31; lean_object* x_32; 
x_29 = 1;
x_30 = lean_alloc_ctor(1, 4, 1);
lean_ctor_set(x_30, 0, x_19);
lean_ctor_set(x_30, 1, x_20);
lean_ctor_set(x_30, 2, x_21);
lean_ctor_set(x_30, 3, x_22);
lean_ctor_set_uint8(x_30, sizeof(void*)*4, x_29);
x_31 = lean_alloc_ctor(1, 4, 1);
lean_ctor_set(x_31, 0, x_25);
lean_ctor_set(x_31, 1, x_26);
lean_ctor_set(x_31, 2, x_27);
lean_ctor_set(x_31, 3, x_28);
lean_ctor_set_uint8(x_31, sizeof(void*)*4, x_29);
x_32 = lean_alloc_ctor(1, 4, 1);
lean_ctor_set(x_32, 0, x_30);
lean_ctor_set(x_32, 1, x_23);
lean_ctor_set(x_32, 2, x_24);
lean_ctor_set(x_32, 3, x_31);
lean_ctor_set_uint8(x_32, sizeof(void*)*4, x_14);
return x_32;
}
}
else
{
x_7 = x_3;
x_8 = x_4;
x_9 = x_5;
x_10 = x_6;
goto block_13;
}
block_13:
{
uint8_t x_11; lean_object* x_12; 
x_11 = 1;
x_12 = lean_alloc_ctor(1, 4, 1);
lean_ctor_set(x_12, 0, x_7);
lean_ctor_set(x_12, 1, x_8);
lean_ctor_set(x_12, 2, x_9);
lean_ctor_set(x_12, 3, x_10);
lean_ctor_set_uint8(x_12, sizeof(void*)*4, x_11);
return x_12;
}
}
}
LEAN_EXPORT lean_object* l_Lean_RBNode_balance2___redArg(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) {
_start:
{
lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; 
if (lean_obj_tag(x_4) == 1)
{
uint8_t x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; lean_object* x_21; lean_object* x_22; lean_object* x_23; lean_object* x_24; lean_object* x_25; lean_object* x_26; 
x_12 = lean_ctor_get_uint8(x_4, sizeof(void*)*4);
x_13 = lean_ctor_get(x_4, 0);
x_14 = lean_ctor_get(x_4, 1);
x_15 = lean_ctor_get(x_4, 2);
x_16 = lean_ctor_get(x_4, 3);
if (x_12 == 0)
{
if (lean_obj_tag(x_13) == 1)
{
uint8_t x_32; 
x_32 = lean_ctor_get_uint8(x_13, sizeof(void*)*4);
if (x_32 == 0)
{
lean_object* x_33; lean_object* x_34; lean_object* x_35; lean_object* x_36; 
lean_inc(x_16);
lean_inc(x_15);
lean_inc(x_14);
lean_inc_ref(x_13);
lean_dec_ref(x_4);
x_33 = lean_ctor_get(x_13, 0);
lean_inc(x_33);
x_34 = lean_ctor_get(x_13, 1);
lean_inc(x_34);
x_35 = lean_ctor_get(x_13, 2);
lean_inc(x_35);
x_36 = lean_ctor_get(x_13, 3);
lean_inc(x_36);
lean_dec_ref(x_13);
x_17 = x_1;
x_18 = x_2;
x_19 = x_3;
x_20 = x_33;
x_21 = x_34;
x_22 = x_35;
x_23 = x_36;
x_24 = x_14;
x_25 = x_15;
x_26 = x_16;
goto block_31;
}
else
{
if (lean_obj_tag(x_16) == 1)
{
uint8_t x_37; 
x_37 = lean_ctor_get_uint8(x_16, sizeof(void*)*4);
if (x_37 == 0)
{
lean_object* x_38; lean_object* x_39; lean_object* x_40; lean_object* x_41; 
lean_inc_ref(x_16);
lean_inc(x_15);
lean_inc(x_14);
lean_inc_ref(x_13);
lean_dec_ref(x_4);
x_38 = lean_ctor_get(x_16, 0);
lean_inc(x_38);
x_39 = lean_ctor_get(x_16, 1);
lean_inc(x_39);
x_40 = lean_ctor_get(x_16, 2);
lean_inc(x_40);
x_41 = lean_ctor_get(x_16, 3);
lean_inc(x_41);
lean_dec_ref(x_16);
x_17 = x_1;
x_18 = x_2;
x_19 = x_3;
x_20 = x_13;
x_21 = x_14;
x_22 = x_15;
x_23 = x_38;
x_24 = x_39;
x_25 = x_40;
x_26 = x_41;
goto block_31;
}
else
{
x_5 = x_1;
x_6 = x_2;
x_7 = x_3;
x_8 = x_4;
goto block_11;
}
}
else
{
x_5 = x_1;
x_6 = x_2;
x_7 = x_3;
x_8 = x_4;
goto block_11;
}
}
}
else
{
if (lean_obj_tag(x_16) == 1)
{
uint8_t x_42; 
x_42 = lean_ctor_get_uint8(x_16, sizeof(void*)*4);
if (x_42 == 0)
{
lean_object* x_43; lean_object* x_44; lean_object* x_45; lean_object* x_46; 
lean_inc_ref(x_16);
lean_inc(x_15);
lean_inc(x_14);
lean_inc(x_13);
lean_dec_ref(x_4);
x_43 = lean_ctor_get(x_16, 0);
lean_inc(x_43);
x_44 = lean_ctor_get(x_16, 1);
lean_inc(x_44);
x_45 = lean_ctor_get(x_16, 2);
lean_inc(x_45);
x_46 = lean_ctor_get(x_16, 3);
lean_inc(x_46);
lean_dec_ref(x_16);
x_17 = x_1;
x_18 = x_2;
x_19 = x_3;
x_20 = x_13;
x_21 = x_14;
x_22 = x_15;
x_23 = x_43;
x_24 = x_44;
x_25 = x_45;
x_26 = x_46;
goto block_31;
}
else
{
x_5 = x_1;
x_6 = x_2;
x_7 = x_3;
x_8 = x_4;
goto block_11;
}
}
else
{
x_5 = x_1;
x_6 = x_2;
x_7 = x_3;
x_8 = x_4;
goto block_11;
}
}
}
else
{
x_5 = x_1;
x_6 = x_2;
x_7 = x_3;
x_8 = x_4;
goto block_11;
}
block_31:
{
uint8_t x_27; lean_object* x_28; lean_object* x_29; lean_object* x_30; 
x_27 = 1;
x_28 = lean_alloc_ctor(1, 4, 1);
lean_ctor_set(x_28, 0, x_17);
lean_ctor_set(x_28, 1, x_18);
lean_ctor_set(x_28, 2, x_19);
lean_ctor_set(x_28, 3, x_20);
lean_ctor_set_uint8(x_28, sizeof(void*)*4, x_27);
x_29 = lean_alloc_ctor(1, 4, 1);
lean_ctor_set(x_29, 0, x_23);
lean_ctor_set(x_29, 1, x_24);
lean_ctor_set(x_29, 2, x_25);
lean_ctor_set(x_29, 3, x_26);
lean_ctor_set_uint8(x_29, sizeof(void*)*4, x_27);
x_30 = lean_alloc_ctor(1, 4, 1);
lean_ctor_set(x_30, 0, x_28);
lean_ctor_set(x_30, 1, x_21);
lean_ctor_set(x_30, 2, x_22);
lean_ctor_set(x_30, 3, x_29);
lean_ctor_set_uint8(x_30, sizeof(void*)*4, x_12);
return x_30;
}
}
else
{
x_5 = x_1;
x_6 = x_2;
x_7 = x_3;
x_8 = x_4;
goto block_11;
}
block_11:
{
uint8_t x_9; lean_object* x_10; 
x_9 = 1;
x_10 = lean_alloc_ctor(1, 4, 1);
lean_ctor_set(x_10, 0, x_5);
lean_ctor_set(x_10, 1, x_6);
lean_ctor_set(x_10, 2, x_7);
lean_ctor_set(x_10, 3, x_8);
lean_ctor_set_uint8(x_10, sizeof(void*)*4, x_9);
return x_10;
}
}
}
LEAN_EXPORT uint8_t l_Lean_RBNode_isRed___redArg(lean_object* x_1) {
_start:
{
if (lean_obj_tag(x_1) == 1)
{
uint8_t x_2; 
x_2 = lean_ctor_get_uint8(x_1, sizeof(void*)*4);
if (x_2 == 0)
{
uint8_t x_3; 
x_3 = 1;
return x_3;
}
else
{
uint8_t x_4; 
x_4 = 0;
return x_4;
}
}
else
{
uint8_t x_5; 
x_5 = 0;
return x_5;
}
}
}
LEAN_EXPORT uint8_t l_Lean_RBNode_isRed(lean_object* x_1, lean_object* x_2, lean_object* x_3) {
_start:
{
uint8_t x_4; 
x_4 = l_Lean_RBNode_isRed___redArg(x_3);
return x_4;
}
}
LEAN_EXPORT lean_object* l_Lean_RBNode_isRed___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) {
_start:
{
uint8_t x_4; lean_object* x_5; 
x_4 = l_Lean_RBNode_isRed(x_1, x_2, x_3);
lean_dec(x_3);
x_5 = lean_box(x_4);
return x_5;
}
}
LEAN_EXPORT lean_object* l_Lean_RBNode_isRed___redArg___boxed(lean_object* x_1) {
_start:
{
uint8_t x_2; lean_object* x_3; 
x_2 = l_Lean_RBNode_isRed___redArg(x_1);
lean_dec(x_1);
x_3 = lean_box(x_2);
return x_3;
}
}
LEAN_EXPORT uint8_t l_Lean_RBNode_isBlack___redArg(lean_object* x_1) {
_start:
{
if (lean_obj_tag(x_1) == 1)
{
uint8_t x_2; 
x_2 = lean_ctor_get_uint8(x_1, sizeof(void*)*4);
if (x_2 == 1)
{
uint8_t x_3; 
x_3 = 1;
return x_3;
}
else
{
uint8_t x_4; 
x_4 = 0;
return x_4;
}
}
else
{
uint8_t x_5; 
x_5 = 0;
return x_5;
}
}
}
LEAN_EXPORT uint8_t l_Lean_RBNode_isBlack(lean_object* x_1, lean_object* x_2, lean_object* x_3) {
_start:
{
uint8_t x_4; 
x_4 = l_Lean_RBNode_isBlack___redArg(x_3);
return x_4;
}
}
LEAN_EXPORT lean_object* l_Lean_RBNode_isBlack___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) {
_start:
{
uint8_t x_4; lean_object* x_5; 
x_4 = l_Lean_RBNode_isBlack(x_1, x_2, x_3);
lean_dec(x_3);
x_5 = lean_box(x_4);
return x_5;
}
}
LEAN_EXPORT lean_object* l_Lean_RBNode_isBlack___redArg___boxed(lean_object* x_1) {
_start:
{
uint8_t x_2; lean_object* x_3; 
x_2 = l_Lean_RBNode_isBlack___redArg(x_1);
lean_dec(x_1);
x_3 = lean_box(x_2);
return x_3;
}
}
LEAN_EXPORT lean_object* l_Lean_RBNode_ins___redArg(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) {
_start:
{
if (lean_obj_tag(x_2) == 0)
{
uint8_t x_5; lean_object* x_6; 
lean_dec_ref(x_1);
x_5 = 0;
x_6 = lean_alloc_ctor(1, 4, 1);
lean_ctor_set(x_6, 0, x_2);
lean_ctor_set(x_6, 1, x_3);
lean_ctor_set(x_6, 2, x_4);
lean_ctor_set(x_6, 3, x_2);
lean_ctor_set_uint8(x_6, sizeof(void*)*4, x_5);
return x_6;
}
else
{
uint8_t x_7; 
x_7 = lean_ctor_get_uint8(x_2, sizeof(void*)*4);
if (x_7 == 0)
{
uint8_t x_8; 
x_8 = !lean_is_exclusive(x_2);
if (x_8 == 0)
{
lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; uint8_t x_14; 
x_9 = lean_ctor_get(x_2, 0);
x_10 = lean_ctor_get(x_2, 1);
x_11 = lean_ctor_get(x_2, 2);
x_12 = lean_ctor_get(x_2, 3);
lean_inc_ref(x_1);
lean_inc(x_10);
lean_inc(x_3);
x_13 = lean_apply_2(x_1, x_3, x_10);
x_14 = lean_unbox(x_13);
switch (x_14) {
case 0:
{
lean_object* x_15; 
x_15 = l_Lean_RBNode_ins___redArg(x_1, x_9, x_3, x_4);
lean_ctor_set(x_2, 0, x_15);
return x_2;
}
case 1:
{
lean_dec(x_11);
lean_dec(x_10);
lean_dec_ref(x_1);
lean_ctor_set(x_2, 2, x_4);
lean_ctor_set(x_2, 1, x_3);
return x_2;
}
default: 
{
lean_object* x_16; 
x_16 = l_Lean_RBNode_ins___redArg(x_1, x_12, x_3, x_4);
lean_ctor_set(x_2, 3, x_16);
return x_2;
}
}
}
else
{
lean_object* x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; lean_object* x_21; uint8_t x_22; 
x_17 = lean_ctor_get(x_2, 0);
x_18 = lean_ctor_get(x_2, 1);
x_19 = lean_ctor_get(x_2, 2);
x_20 = lean_ctor_get(x_2, 3);
lean_inc(x_20);
lean_inc(x_19);
lean_inc(x_18);
lean_inc(x_17);
lean_dec(x_2);
lean_inc_ref(x_1);
lean_inc(x_18);
lean_inc(x_3);
x_21 = lean_apply_2(x_1, x_3, x_18);
x_22 = lean_unbox(x_21);
switch (x_22) {
case 0:
{
lean_object* x_23; lean_object* x_24; 
x_23 = l_Lean_RBNode_ins___redArg(x_1, x_17, x_3, x_4);
x_24 = lean_alloc_ctor(1, 4, 1);
lean_ctor_set(x_24, 0, x_23);
lean_ctor_set(x_24, 1, x_18);
lean_ctor_set(x_24, 2, x_19);
lean_ctor_set(x_24, 3, x_20);
lean_ctor_set_uint8(x_24, sizeof(void*)*4, x_7);
return x_24;
}
case 1:
{
lean_object* x_25; 
lean_dec(x_19);
lean_dec(x_18);
lean_dec_ref(x_1);
x_25 = lean_alloc_ctor(1, 4, 1);
lean_ctor_set(x_25, 0, x_17);
lean_ctor_set(x_25, 1, x_3);
lean_ctor_set(x_25, 2, x_4);
lean_ctor_set(x_25, 3, x_20);
lean_ctor_set_uint8(x_25, sizeof(void*)*4, x_7);
return x_25;
}
default: 
{
lean_object* x_26; lean_object* x_27; 
x_26 = l_Lean_RBNode_ins___redArg(x_1, x_20, x_3, x_4);
x_27 = lean_alloc_ctor(1, 4, 1);
lean_ctor_set(x_27, 0, x_17);
lean_ctor_set(x_27, 1, x_18);
lean_ctor_set(x_27, 2, x_19);
lean_ctor_set(x_27, 3, x_26);
lean_ctor_set_uint8(x_27, sizeof(void*)*4, x_7);
return x_27;
}
}
}
}
else
{
lean_object* x_28; lean_object* x_29; lean_object* x_30; lean_object* x_31; lean_object* x_32; lean_object* x_33; uint8_t x_34; 
x_28 = lean_ctor_get(x_2, 0);
lean_inc(x_28);
x_29 = lean_ctor_get(x_2, 1);
lean_inc(x_29);
x_30 = lean_ctor_get(x_2, 2);
lean_inc(x_30);
x_31 = lean_ctor_get(x_2, 3);
lean_inc(x_31);
if (lean_is_exclusive(x_2)) {
 lean_ctor_release(x_2, 0);
 lean_ctor_release(x_2, 1);
 lean_ctor_release(x_2, 2);
 lean_ctor_release(x_2, 3);
 x_32 = x_2;
} else {
 lean_dec_ref(x_2);
 x_32 = lean_box(0);
}
lean_inc_ref(x_1);
lean_inc(x_29);
lean_inc(x_3);
x_33 = lean_apply_2(x_1, x_3, x_29);
x_34 = lean_unbox(x_33);
switch (x_34) {
case 0:
{
lean_object* x_35; 
x_35 = l_Lean_RBNode_ins___redArg(x_1, x_28, x_3, x_4);
if (lean_obj_tag(x_35) == 1)
{
uint8_t x_36; lean_object* x_37; lean_object* x_38; lean_object* x_39; lean_object* x_40; lean_object* x_41; lean_object* x_42; lean_object* x_43; lean_object* x_44; lean_object* x_45; lean_object* x_46; lean_object* x_47; lean_object* x_48; lean_object* x_49; lean_object* x_50; 
x_36 = lean_ctor_get_uint8(x_35, sizeof(void*)*4);
x_37 = lean_ctor_get(x_35, 0);
lean_inc(x_37);
x_38 = lean_ctor_get(x_35, 1);
lean_inc(x_38);
x_39 = lean_ctor_get(x_35, 2);
lean_inc(x_39);
x_40 = lean_ctor_get(x_35, 3);
lean_inc(x_40);
if (x_36 == 0)
{
if (lean_obj_tag(x_37) == 1)
{
uint8_t x_55; 
x_55 = lean_ctor_get_uint8(x_37, sizeof(void*)*4);
if (x_55 == 0)
{
lean_object* x_56; lean_object* x_57; lean_object* x_58; lean_object* x_59; 
lean_dec_ref(x_35);
x_56 = lean_ctor_get(x_37, 0);
lean_inc(x_56);
x_57 = lean_ctor_get(x_37, 1);
lean_inc(x_57);
x_58 = lean_ctor_get(x_37, 2);
lean_inc(x_58);
x_59 = lean_ctor_get(x_37, 3);
lean_inc(x_59);
lean_dec_ref(x_37);
x_41 = x_56;
x_42 = x_57;
x_43 = x_58;
x_44 = x_59;
x_45 = x_38;
x_46 = x_39;
x_47 = x_40;
x_48 = x_29;
x_49 = x_30;
x_50 = x_31;
goto block_54;
}
else
{
if (lean_obj_tag(x_40) == 1)
{
uint8_t x_60; 
x_60 = lean_ctor_get_uint8(x_40, sizeof(void*)*4);
if (x_60 == 0)
{
lean_object* x_61; lean_object* x_62; lean_object* x_63; lean_object* x_64; 
lean_dec_ref(x_35);
x_61 = lean_ctor_get(x_40, 0);
lean_inc(x_61);
x_62 = lean_ctor_get(x_40, 1);
lean_inc(x_62);
x_63 = lean_ctor_get(x_40, 2);
lean_inc(x_63);
x_64 = lean_ctor_get(x_40, 3);
lean_inc(x_64);
lean_dec_ref(x_40);
x_41 = x_37;
x_42 = x_38;
x_43 = x_39;
x_44 = x_61;
x_45 = x_62;
x_46 = x_63;
x_47 = x_64;
x_48 = x_29;
x_49 = x_30;
x_50 = x_31;
goto block_54;
}
else
{
uint8_t x_65; 
lean_dec(x_39);
lean_dec(x_38);
lean_dec_ref(x_37);
lean_dec(x_32);
x_65 = !lean_is_exclusive(x_40);
if (x_65 == 0)
{
lean_object* x_66; lean_object* x_67; lean_object* x_68; lean_object* x_69; 
x_66 = lean_ctor_get(x_40, 3);
lean_dec(x_66);
x_67 = lean_ctor_get(x_40, 2);
lean_dec(x_67);
x_68 = lean_ctor_get(x_40, 1);
lean_dec(x_68);
x_69 = lean_ctor_get(x_40, 0);
lean_dec(x_69);
lean_ctor_set(x_40, 3, x_31);
lean_ctor_set(x_40, 2, x_30);
lean_ctor_set(x_40, 1, x_29);
lean_ctor_set(x_40, 0, x_35);
lean_ctor_set_uint8(x_40, sizeof(void*)*4, x_7);
return x_40;
}
else
{
lean_object* x_70; 
lean_dec(x_40);
x_70 = lean_alloc_ctor(1, 4, 1);
lean_ctor_set(x_70, 0, x_35);
lean_ctor_set(x_70, 1, x_29);
lean_ctor_set(x_70, 2, x_30);
lean_ctor_set(x_70, 3, x_31);
lean_ctor_set_uint8(x_70, sizeof(void*)*4, x_7);
return x_70;
}
}
}
else
{
uint8_t x_71; 
lean_dec(x_40);
lean_dec(x_39);
lean_dec(x_38);
lean_dec(x_32);
x_71 = !lean_is_exclusive(x_37);
if (x_71 == 0)
{
lean_object* x_72; lean_object* x_73; lean_object* x_74; lean_object* x_75; 
x_72 = lean_ctor_get(x_37, 3);
lean_dec(x_72);
x_73 = lean_ctor_get(x_37, 2);
lean_dec(x_73);
x_74 = lean_ctor_get(x_37, 1);
lean_dec(x_74);
x_75 = lean_ctor_get(x_37, 0);
lean_dec(x_75);
lean_ctor_set(x_37, 3, x_31);
lean_ctor_set(x_37, 2, x_30);
lean_ctor_set(x_37, 1, x_29);
lean_ctor_set(x_37, 0, x_35);
lean_ctor_set_uint8(x_37, sizeof(void*)*4, x_7);
return x_37;
}
else
{
lean_object* x_76; 
lean_dec(x_37);
x_76 = lean_alloc_ctor(1, 4, 1);
lean_ctor_set(x_76, 0, x_35);
lean_ctor_set(x_76, 1, x_29);
lean_ctor_set(x_76, 2, x_30);
lean_ctor_set(x_76, 3, x_31);
lean_ctor_set_uint8(x_76, sizeof(void*)*4, x_7);
return x_76;
}
}
}
}
else
{
if (lean_obj_tag(x_40) == 1)
{
uint8_t x_77; 
x_77 = lean_ctor_get_uint8(x_40, sizeof(void*)*4);
if (x_77 == 0)
{
lean_object* x_78; lean_object* x_79; lean_object* x_80; lean_object* x_81; 
lean_dec_ref(x_35);
x_78 = lean_ctor_get(x_40, 0);
lean_inc(x_78);
x_79 = lean_ctor_get(x_40, 1);
lean_inc(x_79);
x_80 = lean_ctor_get(x_40, 2);
lean_inc(x_80);
x_81 = lean_ctor_get(x_40, 3);
lean_inc(x_81);
lean_dec_ref(x_40);
x_41 = x_37;
x_42 = x_38;
x_43 = x_39;
x_44 = x_78;
x_45 = x_79;
x_46 = x_80;
x_47 = x_81;
x_48 = x_29;
x_49 = x_30;
x_50 = x_31;
goto block_54;
}
else
{
uint8_t x_82; 
lean_dec(x_39);
lean_dec(x_38);
lean_dec(x_37);
lean_dec(x_32);
x_82 = !lean_is_exclusive(x_40);
if (x_82 == 0)
{
lean_object* x_83; lean_object* x_84; lean_object* x_85; lean_object* x_86; 
x_83 = lean_ctor_get(x_40, 3);
lean_dec(x_83);
x_84 = lean_ctor_get(x_40, 2);
lean_dec(x_84);
x_85 = lean_ctor_get(x_40, 1);
lean_dec(x_85);
x_86 = lean_ctor_get(x_40, 0);
lean_dec(x_86);
lean_ctor_set(x_40, 3, x_31);
lean_ctor_set(x_40, 2, x_30);
lean_ctor_set(x_40, 1, x_29);
lean_ctor_set(x_40, 0, x_35);
lean_ctor_set_uint8(x_40, sizeof(void*)*4, x_7);
return x_40;
}
else
{
lean_object* x_87; 
lean_dec(x_40);
x_87 = lean_alloc_ctor(1, 4, 1);
lean_ctor_set(x_87, 0, x_35);
lean_ctor_set(x_87, 1, x_29);
lean_ctor_set(x_87, 2, x_30);
lean_ctor_set(x_87, 3, x_31);
lean_ctor_set_uint8(x_87, sizeof(void*)*4, x_7);
return x_87;
}
}
}
else
{
lean_object* x_88; 
lean_dec(x_40);
lean_dec(x_39);
lean_dec(x_38);
lean_dec(x_37);
lean_dec(x_32);
x_88 = lean_alloc_ctor(1, 4, 1);
lean_ctor_set(x_88, 0, x_35);
lean_ctor_set(x_88, 1, x_29);
lean_ctor_set(x_88, 2, x_30);
lean_ctor_set(x_88, 3, x_31);
lean_ctor_set_uint8(x_88, sizeof(void*)*4, x_7);
return x_88;
}
}
}
else
{
lean_object* x_89; 
lean_dec(x_40);
lean_dec(x_39);
lean_dec(x_38);
lean_dec(x_37);
lean_dec(x_32);
x_89 = lean_alloc_ctor(1, 4, 1);
lean_ctor_set(x_89, 0, x_35);
lean_ctor_set(x_89, 1, x_29);
lean_ctor_set(x_89, 2, x_30);
lean_ctor_set(x_89, 3, x_31);
lean_ctor_set_uint8(x_89, sizeof(void*)*4, x_7);
return x_89;
}
block_54:
{
lean_object* x_51; lean_object* x_52; lean_object* x_53; 
if (lean_is_scalar(x_32)) {
 x_51 = lean_alloc_ctor(1, 4, 1);
} else {
 x_51 = x_32;
}
lean_ctor_set(x_51, 0, x_41);
lean_ctor_set(x_51, 1, x_42);
lean_ctor_set(x_51, 2, x_43);
lean_ctor_set(x_51, 3, x_44);
lean_ctor_set_uint8(x_51, sizeof(void*)*4, x_7);
x_52 = lean_alloc_ctor(1, 4, 1);
lean_ctor_set(x_52, 0, x_47);
lean_ctor_set(x_52, 1, x_48);
lean_ctor_set(x_52, 2, x_49);
lean_ctor_set(x_52, 3, x_50);
lean_ctor_set_uint8(x_52, sizeof(void*)*4, x_7);
x_53 = lean_alloc_ctor(1, 4, 1);
lean_ctor_set(x_53, 0, x_51);
lean_ctor_set(x_53, 1, x_45);
lean_ctor_set(x_53, 2, x_46);
lean_ctor_set(x_53, 3, x_52);
lean_ctor_set_uint8(x_53, sizeof(void*)*4, x_36);
return x_53;
}
}
else
{
lean_object* x_90; 
if (lean_is_scalar(x_32)) {
 x_90 = lean_alloc_ctor(1, 4, 1);
} else {
 x_90 = x_32;
}
lean_ctor_set(x_90, 0, x_35);
lean_ctor_set(x_90, 1, x_29);
lean_ctor_set(x_90, 2, x_30);
lean_ctor_set(x_90, 3, x_31);
lean_ctor_set_uint8(x_90, sizeof(void*)*4, x_7);
return x_90;
}
}
case 1:
{
lean_object* x_91; 
lean_dec(x_30);
lean_dec(x_29);
lean_dec_ref(x_1);
if (lean_is_scalar(x_32)) {
 x_91 = lean_alloc_ctor(1, 4, 1);
} else {
 x_91 = x_32;
}
lean_ctor_set(x_91, 0, x_28);
lean_ctor_set(x_91, 1, x_3);
lean_ctor_set(x_91, 2, x_4);
lean_ctor_set(x_91, 3, x_31);
lean_ctor_set_uint8(x_91, sizeof(void*)*4, x_7);
return x_91;
}
default: 
{
lean_object* x_92; 
x_92 = l_Lean_RBNode_ins___redArg(x_1, x_31, x_3, x_4);
if (lean_obj_tag(x_92) == 1)
{
uint8_t x_93; lean_object* x_94; lean_object* x_95; lean_object* x_96; lean_object* x_97; lean_object* x_98; lean_object* x_99; lean_object* x_100; lean_object* x_101; lean_object* x_102; lean_object* x_103; lean_object* x_104; lean_object* x_105; lean_object* x_106; lean_object* x_107; 
x_93 = lean_ctor_get_uint8(x_92, sizeof(void*)*4);
x_94 = lean_ctor_get(x_92, 0);
lean_inc(x_94);
x_95 = lean_ctor_get(x_92, 1);
lean_inc(x_95);
x_96 = lean_ctor_get(x_92, 2);
lean_inc(x_96);
x_97 = lean_ctor_get(x_92, 3);
lean_inc(x_97);
if (x_93 == 0)
{
if (lean_obj_tag(x_94) == 1)
{
uint8_t x_112; 
x_112 = lean_ctor_get_uint8(x_94, sizeof(void*)*4);
if (x_112 == 0)
{
lean_object* x_113; lean_object* x_114; lean_object* x_115; lean_object* x_116; 
lean_dec_ref(x_92);
x_113 = lean_ctor_get(x_94, 0);
lean_inc(x_113);
x_114 = lean_ctor_get(x_94, 1);
lean_inc(x_114);
x_115 = lean_ctor_get(x_94, 2);
lean_inc(x_115);
x_116 = lean_ctor_get(x_94, 3);
lean_inc(x_116);
lean_dec_ref(x_94);
x_98 = x_28;
x_99 = x_29;
x_100 = x_30;
x_101 = x_113;
x_102 = x_114;
x_103 = x_115;
x_104 = x_116;
x_105 = x_95;
x_106 = x_96;
x_107 = x_97;
goto block_111;
}
else
{
if (lean_obj_tag(x_97) == 1)
{
uint8_t x_117; 
x_117 = lean_ctor_get_uint8(x_97, sizeof(void*)*4);
if (x_117 == 0)
{
lean_object* x_118; lean_object* x_119; lean_object* x_120; lean_object* x_121; 
lean_dec_ref(x_92);
x_118 = lean_ctor_get(x_97, 0);
lean_inc(x_118);
x_119 = lean_ctor_get(x_97, 1);
lean_inc(x_119);
x_120 = lean_ctor_get(x_97, 2);
lean_inc(x_120);
x_121 = lean_ctor_get(x_97, 3);
lean_inc(x_121);
lean_dec_ref(x_97);
x_98 = x_28;
x_99 = x_29;
x_100 = x_30;
x_101 = x_94;
x_102 = x_95;
x_103 = x_96;
x_104 = x_118;
x_105 = x_119;
x_106 = x_120;
x_107 = x_121;
goto block_111;
}
else
{
uint8_t x_122; 
lean_dec(x_96);
lean_dec(x_95);
lean_dec_ref(x_94);
lean_dec(x_32);
x_122 = !lean_is_exclusive(x_97);
if (x_122 == 0)
{
lean_object* x_123; lean_object* x_124; lean_object* x_125; lean_object* x_126; 
x_123 = lean_ctor_get(x_97, 3);
lean_dec(x_123);
x_124 = lean_ctor_get(x_97, 2);
lean_dec(x_124);
x_125 = lean_ctor_get(x_97, 1);
lean_dec(x_125);
x_126 = lean_ctor_get(x_97, 0);
lean_dec(x_126);
lean_ctor_set(x_97, 3, x_92);
lean_ctor_set(x_97, 2, x_30);
lean_ctor_set(x_97, 1, x_29);
lean_ctor_set(x_97, 0, x_28);
lean_ctor_set_uint8(x_97, sizeof(void*)*4, x_7);
return x_97;
}
else
{
lean_object* x_127; 
lean_dec(x_97);
x_127 = lean_alloc_ctor(1, 4, 1);
lean_ctor_set(x_127, 0, x_28);
lean_ctor_set(x_127, 1, x_29);
lean_ctor_set(x_127, 2, x_30);
lean_ctor_set(x_127, 3, x_92);
lean_ctor_set_uint8(x_127, sizeof(void*)*4, x_7);
return x_127;
}
}
}
else
{
uint8_t x_128; 
lean_dec(x_97);
lean_dec(x_96);
lean_dec(x_95);
lean_dec(x_32);
x_128 = !lean_is_exclusive(x_94);
if (x_128 == 0)
{
lean_object* x_129; lean_object* x_130; lean_object* x_131; lean_object* x_132; 
x_129 = lean_ctor_get(x_94, 3);
lean_dec(x_129);
x_130 = lean_ctor_get(x_94, 2);
lean_dec(x_130);
x_131 = lean_ctor_get(x_94, 1);
lean_dec(x_131);
x_132 = lean_ctor_get(x_94, 0);
lean_dec(x_132);
lean_ctor_set(x_94, 3, x_92);
lean_ctor_set(x_94, 2, x_30);
lean_ctor_set(x_94, 1, x_29);
lean_ctor_set(x_94, 0, x_28);
lean_ctor_set_uint8(x_94, sizeof(void*)*4, x_7);
return x_94;
}
else
{
lean_object* x_133; 
lean_dec(x_94);
x_133 = lean_alloc_ctor(1, 4, 1);
lean_ctor_set(x_133, 0, x_28);
lean_ctor_set(x_133, 1, x_29);
lean_ctor_set(x_133, 2, x_30);
lean_ctor_set(x_133, 3, x_92);
lean_ctor_set_uint8(x_133, sizeof(void*)*4, x_7);
return x_133;
}
}
}
}
else
{
if (lean_obj_tag(x_97) == 1)
{
uint8_t x_134; 
x_134 = lean_ctor_get_uint8(x_97, sizeof(void*)*4);
if (x_134 == 0)
{
lean_object* x_135; lean_object* x_136; lean_object* x_137; lean_object* x_138; 
lean_dec_ref(x_92);
x_135 = lean_ctor_get(x_97, 0);
lean_inc(x_135);
x_136 = lean_ctor_get(x_97, 1);
lean_inc(x_136);
x_137 = lean_ctor_get(x_97, 2);
lean_inc(x_137);
x_138 = lean_ctor_get(x_97, 3);
lean_inc(x_138);
lean_dec_ref(x_97);
x_98 = x_28;
x_99 = x_29;
x_100 = x_30;
x_101 = x_94;
x_102 = x_95;
x_103 = x_96;
x_104 = x_135;
x_105 = x_136;
x_106 = x_137;
x_107 = x_138;
goto block_111;
}
else
{
uint8_t x_139; 
lean_dec(x_96);
lean_dec(x_95);
lean_dec(x_94);
lean_dec(x_32);
x_139 = !lean_is_exclusive(x_97);
if (x_139 == 0)
{
lean_object* x_140; lean_object* x_141; lean_object* x_142; lean_object* x_143; 
x_140 = lean_ctor_get(x_97, 3);
lean_dec(x_140);
x_141 = lean_ctor_get(x_97, 2);
lean_dec(x_141);
x_142 = lean_ctor_get(x_97, 1);
lean_dec(x_142);
x_143 = lean_ctor_get(x_97, 0);
lean_dec(x_143);
lean_ctor_set(x_97, 3, x_92);
lean_ctor_set(x_97, 2, x_30);
lean_ctor_set(x_97, 1, x_29);
lean_ctor_set(x_97, 0, x_28);
lean_ctor_set_uint8(x_97, sizeof(void*)*4, x_7);
return x_97;
}
else
{
lean_object* x_144; 
lean_dec(x_97);
x_144 = lean_alloc_ctor(1, 4, 1);
lean_ctor_set(x_144, 0, x_28);
lean_ctor_set(x_144, 1, x_29);
lean_ctor_set(x_144, 2, x_30);
lean_ctor_set(x_144, 3, x_92);
lean_ctor_set_uint8(x_144, sizeof(void*)*4, x_7);
return x_144;
}
}
}
else
{
lean_object* x_145; 
lean_dec(x_97);
lean_dec(x_96);
lean_dec(x_95);
lean_dec(x_94);
lean_dec(x_32);
x_145 = lean_alloc_ctor(1, 4, 1);
lean_ctor_set(x_145, 0, x_28);
lean_ctor_set(x_145, 1, x_29);
lean_ctor_set(x_145, 2, x_30);
lean_ctor_set(x_145, 3, x_92);
lean_ctor_set_uint8(x_145, sizeof(void*)*4, x_7);
return x_145;
}
}
}
else
{
lean_object* x_146; 
lean_dec(x_97);
lean_dec(x_96);
lean_dec(x_95);
lean_dec(x_94);
lean_dec(x_32);
x_146 = lean_alloc_ctor(1, 4, 1);
lean_ctor_set(x_146, 0, x_28);
lean_ctor_set(x_146, 1, x_29);
lean_ctor_set(x_146, 2, x_30);
lean_ctor_set(x_146, 3, x_92);
lean_ctor_set_uint8(x_146, sizeof(void*)*4, x_7);
return x_146;
}
block_111:
{
lean_object* x_108; lean_object* x_109; lean_object* x_110; 
if (lean_is_scalar(x_32)) {
 x_108 = lean_alloc_ctor(1, 4, 1);
} else {
 x_108 = x_32;
}
lean_ctor_set(x_108, 0, x_98);
lean_ctor_set(x_108, 1, x_99);
lean_ctor_set(x_108, 2, x_100);
lean_ctor_set(x_108, 3, x_101);
lean_ctor_set_uint8(x_108, sizeof(void*)*4, x_7);
x_109 = lean_alloc_ctor(1, 4, 1);
lean_ctor_set(x_109, 0, x_104);
lean_ctor_set(x_109, 1, x_105);
lean_ctor_set(x_109, 2, x_106);
lean_ctor_set(x_109, 3, x_107);
lean_ctor_set_uint8(x_109, sizeof(void*)*4, x_7);
x_110 = lean_alloc_ctor(1, 4, 1);
lean_ctor_set(x_110, 0, x_108);
lean_ctor_set(x_110, 1, x_102);
lean_ctor_set(x_110, 2, x_103);
lean_ctor_set(x_110, 3, x_109);
lean_ctor_set_uint8(x_110, sizeof(void*)*4, x_93);
return x_110;
}
}
else
{
lean_object* x_147; 
if (lean_is_scalar(x_32)) {
 x_147 = lean_alloc_ctor(1, 4, 1);
} else {
 x_147 = x_32;
}
lean_ctor_set(x_147, 0, x_28);
lean_ctor_set(x_147, 1, x_29);
lean_ctor_set(x_147, 2, x_30);
lean_ctor_set(x_147, 3, x_92);
lean_ctor_set_uint8(x_147, sizeof(void*)*4, x_7);
return x_147;
}
}
}
}
}
}
}
LEAN_EXPORT lean_object* l_Lean_RBNode_ins(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6) {
_start:
{
lean_object* x_7; 
x_7 = l_Lean_RBNode_ins___redArg(x_3, x_4, x_5, x_6);
return x_7;
}
}
LEAN_EXPORT lean_object* l_Lean_RBNode_setBlack___redArg(lean_object* x_1) {
_start:
{
if (lean_obj_tag(x_1) == 1)
{
uint8_t x_2; 
x_2 = !lean_is_exclusive(x_1);
if (x_2 == 0)
{
uint8_t x_3; 
x_3 = 1;
lean_ctor_set_uint8(x_1, sizeof(void*)*4, x_3);
return x_1;
}
else
{
lean_object* x_4; lean_object* x_5; lean_object* x_6; lean_object* x_7; uint8_t x_8; lean_object* x_9; 
x_4 = lean_ctor_get(x_1, 0);
x_5 = lean_ctor_get(x_1, 1);
x_6 = lean_ctor_get(x_1, 2);
x_7 = lean_ctor_get(x_1, 3);
lean_inc(x_7);
lean_inc(x_6);
lean_inc(x_5);
lean_inc(x_4);
lean_dec(x_1);
x_8 = 1;
x_9 = lean_alloc_ctor(1, 4, 1);
lean_ctor_set(x_9, 0, x_4);
lean_ctor_set(x_9, 1, x_5);
lean_ctor_set(x_9, 2, x_6);
lean_ctor_set(x_9, 3, x_7);
lean_ctor_set_uint8(x_9, sizeof(void*)*4, x_8);
return x_9;
}
}
else
{
return x_1;
}
}
}
LEAN_EXPORT lean_object* l_Lean_RBNode_setBlack(lean_object* x_1, lean_object* x_2, lean_object* x_3) {
_start:
{
lean_object* x_4; 
x_4 = l_Lean_RBNode_setBlack___redArg(x_3);
return x_4;
}
}
LEAN_EXPORT lean_object* l_Lean_RBNode_insert___redArg(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) {
_start:
{
uint8_t x_5; 
x_5 = l_Lean_RBNode_isRed___redArg(x_2);
if (x_5 == 0)
{
lean_object* x_6; 
x_6 = l_Lean_RBNode_ins___redArg(x_1, x_2, x_3, x_4);
return x_6;
}
else
{
lean_object* x_7; lean_object* x_8; 
x_7 = l_Lean_RBNode_ins___redArg(x_1, x_2, x_3, x_4);
x_8 = l_Lean_RBNode_setBlack___redArg(x_7);
return x_8;
}
}
}
LEAN_EXPORT lean_object* l_Lean_RBNode_insert(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6) {
_start:
{
lean_object* x_7; 
x_7 = l_Lean_RBNode_insert___redArg(x_3, x_4, x_5, x_6);
return x_7;
}
}
LEAN_EXPORT lean_object* l_Lean_RBNode_setRed___redArg(lean_object* x_1) {
_start:
{
if (lean_obj_tag(x_1) == 1)
{
uint8_t x_2; 
x_2 = !lean_is_exclusive(x_1);
if (x_2 == 0)
{
uint8_t x_3; 
x_3 = 0;
lean_ctor_set_uint8(x_1, sizeof(void*)*4, x_3);
return x_1;
}
else
{
lean_object* x_4; lean_object* x_5; lean_object* x_6; lean_object* x_7; uint8_t x_8; lean_object* x_9; 
x_4 = lean_ctor_get(x_1, 0);
x_5 = lean_ctor_get(x_1, 1);
x_6 = lean_ctor_get(x_1, 2);
x_7 = lean_ctor_get(x_1, 3);
lean_inc(x_7);
lean_inc(x_6);
lean_inc(x_5);
lean_inc(x_4);
lean_dec(x_1);
x_8 = 0;
x_9 = lean_alloc_ctor(1, 4, 1);
lean_ctor_set(x_9, 0, x_4);
lean_ctor_set(x_9, 1, x_5);
lean_ctor_set(x_9, 2, x_6);
lean_ctor_set(x_9, 3, x_7);
lean_ctor_set_uint8(x_9, sizeof(void*)*4, x_8);
return x_9;
}
}
else
{
return x_1;
}
}
}
LEAN_EXPORT lean_object* l_Lean_RBNode_setRed(lean_object* x_1, lean_object* x_2, lean_object* x_3) {
_start:
{
lean_object* x_4; 
x_4 = l_Lean_RBNode_setRed___redArg(x_3);
return x_4;
}
}
LEAN_EXPORT lean_object* l_Lean_RBNode_balLeft___redArg(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) {
_start:
{
lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; lean_object* x_21; lean_object* x_28; lean_object* x_29; lean_object* x_30; lean_object* x_31; lean_object* x_32; lean_object* x_33; lean_object* x_34; lean_object* x_53; lean_object* x_54; uint8_t x_55; uint8_t x_56; lean_object* x_57; lean_object* x_58; lean_object* x_59; lean_object* x_60; lean_object* x_61; lean_object* x_62; lean_object* x_63; lean_object* x_64; lean_object* x_65; lean_object* x_66; lean_object* x_67; lean_object* x_73; lean_object* x_74; uint8_t x_75; uint8_t x_76; lean_object* x_77; lean_object* x_78; lean_object* x_79; lean_object* x_80; lean_object* x_81; lean_object* x_85; lean_object* x_86; lean_object* x_87; lean_object* x_88; lean_object* x_89; lean_object* x_90; lean_object* x_91; lean_object* x_92; lean_object* x_93; lean_object* x_94; lean_object* x_126; lean_object* x_127; lean_object* x_128; lean_object* x_129; 
if (lean_obj_tag(x_1) == 1)
{
uint8_t x_133; 
x_133 = lean_ctor_get_uint8(x_1, sizeof(void*)*4);
if (x_133 == 0)
{
uint8_t x_134; 
x_134 = !lean_is_exclusive(x_1);
if (x_134 == 0)
{
uint8_t x_135; lean_object* x_136; 
x_135 = 1;
lean_ctor_set_uint8(x_1, sizeof(void*)*4, x_135);
x_136 = lean_alloc_ctor(1, 4, 1);
lean_ctor_set(x_136, 0, x_1);
lean_ctor_set(x_136, 1, x_2);
lean_ctor_set(x_136, 2, x_3);
lean_ctor_set(x_136, 3, x_4);
lean_ctor_set_uint8(x_136, sizeof(void*)*4, x_133);
return x_136;
}
else
{
lean_object* x_137; lean_object* x_138; lean_object* x_139; lean_object* x_140; uint8_t x_141; lean_object* x_142; lean_object* x_143; 
x_137 = lean_ctor_get(x_1, 0);
x_138 = lean_ctor_get(x_1, 1);
x_139 = lean_ctor_get(x_1, 2);
x_140 = lean_ctor_get(x_1, 3);
lean_inc(x_140);
lean_inc(x_139);
lean_inc(x_138);
lean_inc(x_137);
lean_dec(x_1);
x_141 = 1;
x_142 = lean_alloc_ctor(1, 4, 1);
lean_ctor_set(x_142, 0, x_137);
lean_ctor_set(x_142, 1, x_138);
lean_ctor_set(x_142, 2, x_139);
lean_ctor_set(x_142, 3, x_140);
lean_ctor_set_uint8(x_142, sizeof(void*)*4, x_141);
x_143 = lean_alloc_ctor(1, 4, 1);
lean_ctor_set(x_143, 0, x_142);
lean_ctor_set(x_143, 1, x_2);
lean_ctor_set(x_143, 2, x_3);
lean_ctor_set(x_143, 3, x_4);
lean_ctor_set_uint8(x_143, sizeof(void*)*4, x_133);
return x_143;
}
}
else
{
if (lean_obj_tag(x_4) == 1)
{
uint8_t x_144; 
x_144 = lean_ctor_get_uint8(x_4, sizeof(void*)*4);
if (x_144 == 0)
{
lean_object* x_145; 
x_145 = lean_ctor_get(x_4, 0);
if (lean_obj_tag(x_145) == 1)
{
uint8_t x_146; 
x_146 = lean_ctor_get_uint8(x_145, sizeof(void*)*4);
if (x_146 == 1)
{
lean_object* x_147; lean_object* x_148; lean_object* x_149; lean_object* x_150; lean_object* x_151; lean_object* x_152; lean_object* x_153; 
lean_inc_ref(x_145);
x_147 = lean_ctor_get(x_4, 1);
lean_inc(x_147);
x_148 = lean_ctor_get(x_4, 2);
lean_inc(x_148);
x_149 = lean_ctor_get(x_4, 3);
lean_inc(x_149);
lean_dec_ref(x_4);
x_150 = lean_ctor_get(x_145, 0);
lean_inc(x_150);
x_151 = lean_ctor_get(x_145, 1);
lean_inc(x_151);
x_152 = lean_ctor_get(x_145, 2);
lean_inc(x_152);
x_153 = lean_ctor_get(x_145, 3);
lean_inc(x_153);
lean_dec_ref(x_145);
x_85 = x_1;
x_86 = x_2;
x_87 = x_3;
x_88 = x_150;
x_89 = x_151;
x_90 = x_152;
x_91 = x_153;
x_92 = x_147;
x_93 = x_148;
x_94 = x_149;
goto block_125;
}
else
{
x_126 = x_1;
x_127 = x_2;
x_128 = x_3;
x_129 = x_4;
goto block_132;
}
}
else
{
x_126 = x_1;
x_127 = x_2;
x_128 = x_3;
x_129 = x_4;
goto block_132;
}
}
else
{
lean_object* x_154; lean_object* x_155; lean_object* x_156; lean_object* x_157; 
x_154 = lean_ctor_get(x_4, 0);
lean_inc(x_154);
x_155 = lean_ctor_get(x_4, 1);
lean_inc(x_155);
x_156 = lean_ctor_get(x_4, 2);
lean_inc(x_156);
x_157 = lean_ctor_get(x_4, 3);
lean_inc(x_157);
lean_dec_ref(x_4);
x_28 = x_1;
x_29 = x_2;
x_30 = x_3;
x_31 = x_154;
x_32 = x_155;
x_33 = x_156;
x_34 = x_157;
goto block_52;
}
}
else
{
x_126 = x_1;
x_127 = x_2;
x_128 = x_3;
x_129 = x_4;
goto block_132;
}
}
}
else
{
if (lean_obj_tag(x_4) == 1)
{
uint8_t x_158; 
x_158 = lean_ctor_get_uint8(x_4, sizeof(void*)*4);
if (x_158 == 0)
{
lean_object* x_159; 
x_159 = lean_ctor_get(x_4, 0);
if (lean_obj_tag(x_159) == 1)
{
uint8_t x_160; 
x_160 = lean_ctor_get_uint8(x_159, sizeof(void*)*4);
if (x_160 == 1)
{
lean_object* x_161; lean_object* x_162; lean_object* x_163; lean_object* x_164; lean_object* x_165; lean_object* x_166; lean_object* x_167; 
lean_inc_ref(x_159);
x_161 = lean_ctor_get(x_4, 1);
lean_inc(x_161);
x_162 = lean_ctor_get(x_4, 2);
lean_inc(x_162);
x_163 = lean_ctor_get(x_4, 3);
lean_inc(x_163);
lean_dec_ref(x_4);
x_164 = lean_ctor_get(x_159, 0);
lean_inc(x_164);
x_165 = lean_ctor_get(x_159, 1);
lean_inc(x_165);
x_166 = lean_ctor_get(x_159, 2);
lean_inc(x_166);
x_167 = lean_ctor_get(x_159, 3);
lean_inc(x_167);
lean_dec_ref(x_159);
x_85 = x_1;
x_86 = x_2;
x_87 = x_3;
x_88 = x_164;
x_89 = x_165;
x_90 = x_166;
x_91 = x_167;
x_92 = x_161;
x_93 = x_162;
x_94 = x_163;
goto block_125;
}
else
{
x_126 = x_1;
x_127 = x_2;
x_128 = x_3;
x_129 = x_4;
goto block_132;
}
}
else
{
x_126 = x_1;
x_127 = x_2;
x_128 = x_3;
x_129 = x_4;
goto block_132;
}
}
else
{
lean_object* x_168; lean_object* x_169; lean_object* x_170; lean_object* x_171; 
x_168 = lean_ctor_get(x_4, 0);
lean_inc(x_168);
x_169 = lean_ctor_get(x_4, 1);
lean_inc(x_169);
x_170 = lean_ctor_get(x_4, 2);
lean_inc(x_170);
x_171 = lean_ctor_get(x_4, 3);
lean_inc(x_171);
lean_dec_ref(x_4);
x_28 = x_1;
x_29 = x_2;
x_30 = x_3;
x_31 = x_168;
x_32 = x_169;
x_33 = x_170;
x_34 = x_171;
goto block_52;
}
}
else
{
x_126 = x_1;
x_127 = x_2;
x_128 = x_3;
x_129 = x_4;
goto block_132;
}
}
block_11:
{
uint8_t x_9; lean_object* x_10; 
x_9 = 1;
x_10 = lean_alloc_ctor(1, 4, 1);
lean_ctor_set(x_10, 0, x_5);
lean_ctor_set(x_10, 1, x_6);
lean_ctor_set(x_10, 2, x_7);
lean_ctor_set(x_10, 3, x_8);
lean_ctor_set_uint8(x_10, sizeof(void*)*4, x_9);
return x_10;
}
block_27:
{
uint8_t x_22; uint8_t x_23; lean_object* x_24; lean_object* x_25; lean_object* x_26; 
x_22 = 0;
x_23 = 1;
x_24 = lean_alloc_ctor(1, 4, 1);
lean_ctor_set(x_24, 0, x_12);
lean_ctor_set(x_24, 1, x_13);
lean_ctor_set(x_24, 2, x_14);
lean_ctor_set(x_24, 3, x_15);
lean_ctor_set_uint8(x_24, sizeof(void*)*4, x_23);
x_25 = lean_alloc_ctor(1, 4, 1);
lean_ctor_set(x_25, 0, x_18);
lean_ctor_set(x_25, 1, x_19);
lean_ctor_set(x_25, 2, x_20);
lean_ctor_set(x_25, 3, x_21);
lean_ctor_set_uint8(x_25, sizeof(void*)*4, x_23);
x_26 = lean_alloc_ctor(1, 4, 1);
lean_ctor_set(x_26, 0, x_24);
lean_ctor_set(x_26, 1, x_16);
lean_ctor_set(x_26, 2, x_17);
lean_ctor_set(x_26, 3, x_25);
lean_ctor_set_uint8(x_26, sizeof(void*)*4, x_22);
return x_26;
}
block_52:
{
uint8_t x_35; lean_object* x_36; 
x_35 = 0;
lean_inc(x_34);
lean_inc(x_33);
lean_inc(x_32);
lean_inc(x_31);
x_36 = lean_alloc_ctor(1, 4, 1);
lean_ctor_set(x_36, 0, x_31);
lean_ctor_set(x_36, 1, x_32);
lean_ctor_set(x_36, 2, x_33);
lean_ctor_set(x_36, 3, x_34);
lean_ctor_set_uint8(x_36, sizeof(void*)*4, x_35);
if (lean_obj_tag(x_31) == 1)
{
uint8_t x_37; 
x_37 = lean_ctor_get_uint8(x_31, sizeof(void*)*4);
if (x_37 == 0)
{
lean_object* x_38; lean_object* x_39; lean_object* x_40; lean_object* x_41; 
lean_dec_ref(x_36);
x_38 = lean_ctor_get(x_31, 0);
lean_inc(x_38);
x_39 = lean_ctor_get(x_31, 1);
lean_inc(x_39);
x_40 = lean_ctor_get(x_31, 2);
lean_inc(x_40);
x_41 = lean_ctor_get(x_31, 3);
lean_inc(x_41);
lean_dec_ref(x_31);
x_12 = x_28;
x_13 = x_29;
x_14 = x_30;
x_15 = x_38;
x_16 = x_39;
x_17 = x_40;
x_18 = x_41;
x_19 = x_32;
x_20 = x_33;
x_21 = x_34;
goto block_27;
}
else
{
if (lean_obj_tag(x_34) == 1)
{
uint8_t x_42; 
x_42 = lean_ctor_get_uint8(x_34, sizeof(void*)*4);
if (x_42 == 0)
{
lean_object* x_43; lean_object* x_44; lean_object* x_45; lean_object* x_46; 
lean_dec_ref(x_36);
x_43 = lean_ctor_get(x_34, 0);
lean_inc(x_43);
x_44 = lean_ctor_get(x_34, 1);
lean_inc(x_44);
x_45 = lean_ctor_get(x_34, 2);
lean_inc(x_45);
x_46 = lean_ctor_get(x_34, 3);
lean_inc(x_46);
lean_dec_ref(x_34);
x_12 = x_28;
x_13 = x_29;
x_14 = x_30;
x_15 = x_31;
x_16 = x_32;
x_17 = x_33;
x_18 = x_43;
x_19 = x_44;
x_20 = x_45;
x_21 = x_46;
goto block_27;
}
else
{
lean_dec_ref(x_34);
lean_dec(x_33);
lean_dec(x_32);
lean_dec_ref(x_31);
x_5 = x_28;
x_6 = x_29;
x_7 = x_30;
x_8 = x_36;
goto block_11;
}
}
else
{
lean_dec(x_34);
lean_dec(x_33);
lean_dec(x_32);
lean_dec_ref(x_31);
x_5 = x_28;
x_6 = x_29;
x_7 = x_30;
x_8 = x_36;
goto block_11;
}
}
}
else
{
if (lean_obj_tag(x_34) == 1)
{
uint8_t x_47; 
x_47 = lean_ctor_get_uint8(x_34, sizeof(void*)*4);
if (x_47 == 0)
{
lean_object* x_48; lean_object* x_49; lean_object* x_50; lean_object* x_51; 
lean_dec_ref(x_36);
x_48 = lean_ctor_get(x_34, 0);
lean_inc(x_48);
x_49 = lean_ctor_get(x_34, 1);
lean_inc(x_49);
x_50 = lean_ctor_get(x_34, 2);
lean_inc(x_50);
x_51 = lean_ctor_get(x_34, 3);
lean_inc(x_51);
lean_dec_ref(x_34);
x_12 = x_28;
x_13 = x_29;
x_14 = x_30;
x_15 = x_31;
x_16 = x_32;
x_17 = x_33;
x_18 = x_48;
x_19 = x_49;
x_20 = x_50;
x_21 = x_51;
goto block_27;
}
else
{
lean_dec_ref(x_34);
lean_dec(x_33);
lean_dec(x_32);
lean_dec(x_31);
x_5 = x_28;
x_6 = x_29;
x_7 = x_30;
x_8 = x_36;
goto block_11;
}
}
else
{
lean_dec(x_34);
lean_dec(x_33);
lean_dec(x_32);
lean_dec(x_31);
x_5 = x_28;
x_6 = x_29;
x_7 = x_30;
x_8 = x_36;
goto block_11;
}
}
}
block_72:
{
lean_object* x_68; lean_object* x_69; lean_object* x_70; lean_object* x_71; 
x_68 = lean_alloc_ctor(1, 4, 1);
lean_ctor_set(x_68, 0, x_58);
lean_ctor_set(x_68, 1, x_59);
lean_ctor_set(x_68, 2, x_60);
lean_ctor_set(x_68, 3, x_61);
lean_ctor_set_uint8(x_68, sizeof(void*)*4, x_56);
x_69 = lean_alloc_ctor(1, 4, 1);
lean_ctor_set(x_69, 0, x_64);
lean_ctor_set(x_69, 1, x_65);
lean_ctor_set(x_69, 2, x_66);
lean_ctor_set(x_69, 3, x_67);
lean_ctor_set_uint8(x_69, sizeof(void*)*4, x_56);
x_70 = lean_alloc_ctor(1, 4, 1);
lean_ctor_set(x_70, 0, x_68);
lean_ctor_set(x_70, 1, x_62);
lean_ctor_set(x_70, 2, x_63);
lean_ctor_set(x_70, 3, x_69);
lean_ctor_set_uint8(x_70, sizeof(void*)*4, x_55);
x_71 = lean_alloc_ctor(1, 4, 1);
lean_ctor_set(x_71, 0, x_53);
lean_ctor_set(x_71, 1, x_54);
lean_ctor_set(x_71, 2, x_57);
lean_ctor_set(x_71, 3, x_70);
lean_ctor_set_uint8(x_71, sizeof(void*)*4, x_55);
return x_71;
}
block_84:
{
lean_object* x_82; lean_object* x_83; 
x_82 = lean_alloc_ctor(1, 4, 1);
lean_ctor_set(x_82, 0, x_78);
lean_ctor_set(x_82, 1, x_79);
lean_ctor_set(x_82, 2, x_80);
lean_ctor_set(x_82, 3, x_81);
lean_ctor_set_uint8(x_82, sizeof(void*)*4, x_76);
x_83 = lean_alloc_ctor(1, 4, 1);
lean_ctor_set(x_83, 0, x_73);
lean_ctor_set(x_83, 1, x_74);
lean_ctor_set(x_83, 2, x_77);
lean_ctor_set(x_83, 3, x_82);
lean_ctor_set_uint8(x_83, sizeof(void*)*4, x_75);
return x_83;
}
block_125:
{
uint8_t x_95; uint8_t x_96; lean_object* x_97; lean_object* x_98; 
x_95 = 0;
x_96 = 1;
x_97 = lean_alloc_ctor(1, 4, 1);
lean_ctor_set(x_97, 0, x_85);
lean_ctor_set(x_97, 1, x_86);
lean_ctor_set(x_97, 2, x_87);
lean_ctor_set(x_97, 3, x_88);
lean_ctor_set_uint8(x_97, sizeof(void*)*4, x_96);
x_98 = l_Lean_RBNode_setRed___redArg(x_94);
if (lean_obj_tag(x_98) == 1)
{
uint8_t x_99; 
x_99 = lean_ctor_get_uint8(x_98, sizeof(void*)*4);
if (x_99 == 0)
{
lean_object* x_100; 
x_100 = lean_ctor_get(x_98, 0);
lean_inc(x_100);
if (lean_obj_tag(x_100) == 1)
{
uint8_t x_101; 
x_101 = lean_ctor_get_uint8(x_100, sizeof(void*)*4);
if (x_101 == 0)
{
lean_object* x_102; lean_object* x_103; lean_object* x_104; lean_object* x_105; lean_object* x_106; lean_object* x_107; lean_object* x_108; 
x_102 = lean_ctor_get(x_98, 1);
lean_inc(x_102);
x_103 = lean_ctor_get(x_98, 2);
lean_inc(x_103);
x_104 = lean_ctor_get(x_98, 3);
lean_inc(x_104);
lean_dec_ref(x_98);
x_105 = lean_ctor_get(x_100, 0);
lean_inc(x_105);
x_106 = lean_ctor_get(x_100, 1);
lean_inc(x_106);
x_107 = lean_ctor_get(x_100, 2);
lean_inc(x_107);
x_108 = lean_ctor_get(x_100, 3);
lean_inc(x_108);
lean_dec_ref(x_100);
x_53 = x_97;
x_54 = x_89;
x_55 = x_95;
x_56 = x_96;
x_57 = x_90;
x_58 = x_91;
x_59 = x_92;
x_60 = x_93;
x_61 = x_105;
x_62 = x_106;
x_63 = x_107;
x_64 = x_108;
x_65 = x_102;
x_66 = x_103;
x_67 = x_104;
goto block_72;
}
else
{
lean_object* x_109; 
x_109 = lean_ctor_get(x_98, 3);
lean_inc(x_109);
if (lean_obj_tag(x_109) == 1)
{
uint8_t x_110; 
x_110 = lean_ctor_get_uint8(x_109, sizeof(void*)*4);
if (x_110 == 0)
{
lean_object* x_111; lean_object* x_112; lean_object* x_113; lean_object* x_114; lean_object* x_115; lean_object* x_116; 
x_111 = lean_ctor_get(x_98, 1);
lean_inc(x_111);
x_112 = lean_ctor_get(x_98, 2);
lean_inc(x_112);
lean_dec_ref(x_98);
x_113 = lean_ctor_get(x_109, 0);
lean_inc(x_113);
x_114 = lean_ctor_get(x_109, 1);
lean_inc(x_114);
x_115 = lean_ctor_get(x_109, 2);
lean_inc(x_115);
x_116 = lean_ctor_get(x_109, 3);
lean_inc(x_116);
lean_dec_ref(x_109);
x_53 = x_97;
x_54 = x_89;
x_55 = x_95;
x_56 = x_96;
x_57 = x_90;
x_58 = x_91;
x_59 = x_92;
x_60 = x_93;
x_61 = x_100;
x_62 = x_111;
x_63 = x_112;
x_64 = x_113;
x_65 = x_114;
x_66 = x_115;
x_67 = x_116;
goto block_72;
}
else
{
lean_dec_ref(x_109);
lean_dec_ref(x_100);
x_73 = x_97;
x_74 = x_89;
x_75 = x_95;
x_76 = x_96;
x_77 = x_90;
x_78 = x_91;
x_79 = x_92;
x_80 = x_93;
x_81 = x_98;
goto block_84;
}
}
else
{
lean_dec(x_109);
lean_dec_ref(x_100);
x_73 = x_97;
x_74 = x_89;
x_75 = x_95;
x_76 = x_96;
x_77 = x_90;
x_78 = x_91;
x_79 = x_92;
x_80 = x_93;
x_81 = x_98;
goto block_84;
}
}
}
else
{
lean_object* x_117; 
x_117 = lean_ctor_get(x_98, 3);
lean_inc(x_117);
if (lean_obj_tag(x_117) == 1)
{
uint8_t x_118; 
x_118 = lean_ctor_get_uint8(x_117, sizeof(void*)*4);
if (x_118 == 0)
{
lean_object* x_119; lean_object* x_120; lean_object* x_121; lean_object* x_122; lean_object* x_123; lean_object* x_124; 
x_119 = lean_ctor_get(x_98, 1);
lean_inc(x_119);
x_120 = lean_ctor_get(x_98, 2);
lean_inc(x_120);
lean_dec_ref(x_98);
x_121 = lean_ctor_get(x_117, 0);
lean_inc(x_121);
x_122 = lean_ctor_get(x_117, 1);
lean_inc(x_122);
x_123 = lean_ctor_get(x_117, 2);
lean_inc(x_123);
x_124 = lean_ctor_get(x_117, 3);
lean_inc(x_124);
lean_dec_ref(x_117);
x_53 = x_97;
x_54 = x_89;
x_55 = x_95;
x_56 = x_96;
x_57 = x_90;
x_58 = x_91;
x_59 = x_92;
x_60 = x_93;
x_61 = x_100;
x_62 = x_119;
x_63 = x_120;
x_64 = x_121;
x_65 = x_122;
x_66 = x_123;
x_67 = x_124;
goto block_72;
}
else
{
lean_dec_ref(x_117);
lean_dec(x_100);
x_73 = x_97;
x_74 = x_89;
x_75 = x_95;
x_76 = x_96;
x_77 = x_90;
x_78 = x_91;
x_79 = x_92;
x_80 = x_93;
x_81 = x_98;
goto block_84;
}
}
else
{
lean_dec(x_117);
lean_dec(x_100);
x_73 = x_97;
x_74 = x_89;
x_75 = x_95;
x_76 = x_96;
x_77 = x_90;
x_78 = x_91;
x_79 = x_92;
x_80 = x_93;
x_81 = x_98;
goto block_84;
}
}
}
else
{
x_73 = x_97;
x_74 = x_89;
x_75 = x_95;
x_76 = x_96;
x_77 = x_90;
x_78 = x_91;
x_79 = x_92;
x_80 = x_93;
x_81 = x_98;
goto block_84;
}
}
else
{
x_73 = x_97;
x_74 = x_89;
x_75 = x_95;
x_76 = x_96;
x_77 = x_90;
x_78 = x_91;
x_79 = x_92;
x_80 = x_93;
x_81 = x_98;
goto block_84;
}
}
block_132:
{
uint8_t x_130; lean_object* x_131; 
x_130 = 0;
x_131 = lean_alloc_ctor(1, 4, 1);
lean_ctor_set(x_131, 0, x_126);
lean_ctor_set(x_131, 1, x_127);
lean_ctor_set(x_131, 2, x_128);
lean_ctor_set(x_131, 3, x_129);
lean_ctor_set_uint8(x_131, sizeof(void*)*4, x_130);
return x_131;
}
}
}
LEAN_EXPORT lean_object* l_Lean_RBNode_balLeft(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6) {
_start:
{
lean_object* x_7; 
x_7 = l_Lean_RBNode_balLeft___redArg(x_3, x_4, x_5, x_6);
return x_7;
}
}
LEAN_EXPORT lean_object* l_Lean_RBNode_balRight___redArg(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) {
_start:
{
uint8_t x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; uint8_t x_24; uint8_t x_25; lean_object* x_26; lean_object* x_27; lean_object* x_28; lean_object* x_29; uint8_t x_33; uint8_t x_34; lean_object* x_35; lean_object* x_36; lean_object* x_37; lean_object* x_38; lean_object* x_39; lean_object* x_40; lean_object* x_41; lean_object* x_42; lean_object* x_43; lean_object* x_44; lean_object* x_45; lean_object* x_46; lean_object* x_47; uint8_t x_52; uint8_t x_53; lean_object* x_54; lean_object* x_55; lean_object* x_56; lean_object* x_57; lean_object* x_58; lean_object* x_59; lean_object* x_60; 
if (lean_obj_tag(x_4) == 1)
{
uint8_t x_169; 
x_169 = lean_ctor_get_uint8(x_4, sizeof(void*)*4);
if (x_169 == 0)
{
uint8_t x_170; 
x_170 = !lean_is_exclusive(x_4);
if (x_170 == 0)
{
uint8_t x_171; lean_object* x_172; 
x_171 = 1;
lean_ctor_set_uint8(x_4, sizeof(void*)*4, x_171);
x_172 = lean_alloc_ctor(1, 4, 1);
lean_ctor_set(x_172, 0, x_1);
lean_ctor_set(x_172, 1, x_2);
lean_ctor_set(x_172, 2, x_3);
lean_ctor_set(x_172, 3, x_4);
lean_ctor_set_uint8(x_172, sizeof(void*)*4, x_169);
return x_172;
}
else
{
lean_object* x_173; lean_object* x_174; lean_object* x_175; lean_object* x_176; uint8_t x_177; lean_object* x_178; lean_object* x_179; 
x_173 = lean_ctor_get(x_4, 0);
x_174 = lean_ctor_get(x_4, 1);
x_175 = lean_ctor_get(x_4, 2);
x_176 = lean_ctor_get(x_4, 3);
lean_inc(x_176);
lean_inc(x_175);
lean_inc(x_174);
lean_inc(x_173);
lean_dec(x_4);
x_177 = 1;
x_178 = lean_alloc_ctor(1, 4, 1);
lean_ctor_set(x_178, 0, x_173);
lean_ctor_set(x_178, 1, x_174);
lean_ctor_set(x_178, 2, x_175);
lean_ctor_set(x_178, 3, x_176);
lean_ctor_set_uint8(x_178, sizeof(void*)*4, x_177);
x_179 = lean_alloc_ctor(1, 4, 1);
lean_ctor_set(x_179, 0, x_1);
lean_ctor_set(x_179, 1, x_2);
lean_ctor_set(x_179, 2, x_3);
lean_ctor_set(x_179, 3, x_178);
lean_ctor_set_uint8(x_179, sizeof(void*)*4, x_169);
return x_179;
}
}
else
{
goto block_168;
}
}
else
{
goto block_168;
}
block_7:
{
uint8_t x_5; lean_object* x_6; 
x_5 = 0;
x_6 = lean_alloc_ctor(1, 4, 1);
lean_ctor_set(x_6, 0, x_1);
lean_ctor_set(x_6, 1, x_2);
lean_ctor_set(x_6, 2, x_3);
lean_ctor_set(x_6, 3, x_4);
lean_ctor_set_uint8(x_6, sizeof(void*)*4, x_5);
return x_6;
}
block_23:
{
uint8_t x_19; lean_object* x_20; lean_object* x_21; lean_object* x_22; 
x_19 = 0;
x_20 = lean_alloc_ctor(1, 4, 1);
lean_ctor_set(x_20, 0, x_9);
lean_ctor_set(x_20, 1, x_10);
lean_ctor_set(x_20, 2, x_11);
lean_ctor_set(x_20, 3, x_12);
lean_ctor_set_uint8(x_20, sizeof(void*)*4, x_8);
x_21 = lean_alloc_ctor(1, 4, 1);
lean_ctor_set(x_21, 0, x_15);
lean_ctor_set(x_21, 1, x_16);
lean_ctor_set(x_21, 2, x_17);
lean_ctor_set(x_21, 3, x_18);
lean_ctor_set_uint8(x_21, sizeof(void*)*4, x_8);
x_22 = lean_alloc_ctor(1, 4, 1);
lean_ctor_set(x_22, 0, x_20);
lean_ctor_set(x_22, 1, x_13);
lean_ctor_set(x_22, 2, x_14);
lean_ctor_set(x_22, 3, x_21);
lean_ctor_set_uint8(x_22, sizeof(void*)*4, x_19);
return x_22;
}
block_32:
{
lean_object* x_30; lean_object* x_31; 
x_30 = lean_alloc_ctor(1, 4, 1);
lean_ctor_set(x_30, 0, x_27);
lean_ctor_set(x_30, 1, x_2);
lean_ctor_set(x_30, 2, x_3);
lean_ctor_set(x_30, 3, x_4);
lean_ctor_set_uint8(x_30, sizeof(void*)*4, x_25);
x_31 = lean_alloc_ctor(1, 4, 1);
lean_ctor_set(x_31, 0, x_29);
lean_ctor_set(x_31, 1, x_28);
lean_ctor_set(x_31, 2, x_26);
lean_ctor_set(x_31, 3, x_30);
lean_ctor_set_uint8(x_31, sizeof(void*)*4, x_24);
return x_31;
}
block_51:
{
lean_object* x_48; lean_object* x_49; lean_object* x_50; 
x_48 = lean_alloc_ctor(1, 4, 1);
lean_ctor_set(x_48, 0, x_38);
lean_ctor_set(x_48, 1, x_39);
lean_ctor_set(x_48, 2, x_40);
lean_ctor_set(x_48, 3, x_41);
lean_ctor_set_uint8(x_48, sizeof(void*)*4, x_34);
x_49 = lean_alloc_ctor(1, 4, 1);
lean_ctor_set(x_49, 0, x_44);
lean_ctor_set(x_49, 1, x_45);
lean_ctor_set(x_49, 2, x_46);
lean_ctor_set(x_49, 3, x_47);
lean_ctor_set_uint8(x_49, sizeof(void*)*4, x_34);
x_50 = lean_alloc_ctor(1, 4, 1);
lean_ctor_set(x_50, 0, x_48);
lean_ctor_set(x_50, 1, x_42);
lean_ctor_set(x_50, 2, x_43);
lean_ctor_set(x_50, 3, x_49);
lean_ctor_set_uint8(x_50, sizeof(void*)*4, x_33);
x_24 = x_33;
x_25 = x_34;
x_26 = x_36;
x_27 = x_35;
x_28 = x_37;
x_29 = x_50;
goto block_32;
}
block_62:
{
lean_object* x_61; 
x_61 = lean_alloc_ctor(1, 4, 1);
lean_ctor_set(x_61, 0, x_57);
lean_ctor_set(x_61, 1, x_58);
lean_ctor_set(x_61, 2, x_59);
lean_ctor_set(x_61, 3, x_60);
lean_ctor_set_uint8(x_61, sizeof(void*)*4, x_53);
x_24 = x_52;
x_25 = x_53;
x_26 = x_55;
x_27 = x_54;
x_28 = x_56;
x_29 = x_61;
goto block_32;
}
block_168:
{
if (lean_obj_tag(x_1) == 1)
{
uint8_t x_63; 
x_63 = lean_ctor_get_uint8(x_1, sizeof(void*)*4);
if (x_63 == 0)
{
lean_object* x_64; 
x_64 = lean_ctor_get(x_1, 3);
if (lean_obj_tag(x_64) == 1)
{
uint8_t x_65; 
x_65 = lean_ctor_get_uint8(x_64, sizeof(void*)*4);
if (x_65 == 1)
{
lean_object* x_66; lean_object* x_67; lean_object* x_68; lean_object* x_69; lean_object* x_70; lean_object* x_71; lean_object* x_72; lean_object* x_73; 
lean_inc_ref(x_64);
x_66 = lean_ctor_get(x_1, 0);
lean_inc(x_66);
x_67 = lean_ctor_get(x_1, 1);
lean_inc(x_67);
x_68 = lean_ctor_get(x_1, 2);
lean_inc(x_68);
lean_dec_ref(x_1);
x_69 = lean_ctor_get(x_64, 0);
lean_inc(x_69);
x_70 = lean_ctor_get(x_64, 1);
lean_inc(x_70);
x_71 = lean_ctor_get(x_64, 2);
lean_inc(x_71);
x_72 = lean_ctor_get(x_64, 3);
lean_inc(x_72);
lean_dec_ref(x_64);
x_73 = l_Lean_RBNode_setRed___redArg(x_66);
if (lean_obj_tag(x_73) == 1)
{
uint8_t x_74; 
x_74 = lean_ctor_get_uint8(x_73, sizeof(void*)*4);
if (x_74 == 0)
{
lean_object* x_75; 
x_75 = lean_ctor_get(x_73, 0);
lean_inc(x_75);
if (lean_obj_tag(x_75) == 1)
{
uint8_t x_76; 
x_76 = lean_ctor_get_uint8(x_75, sizeof(void*)*4);
if (x_76 == 0)
{
lean_object* x_77; lean_object* x_78; lean_object* x_79; lean_object* x_80; lean_object* x_81; lean_object* x_82; lean_object* x_83; 
x_77 = lean_ctor_get(x_73, 1);
lean_inc(x_77);
x_78 = lean_ctor_get(x_73, 2);
lean_inc(x_78);
x_79 = lean_ctor_get(x_73, 3);
lean_inc(x_79);
lean_dec_ref(x_73);
x_80 = lean_ctor_get(x_75, 0);
lean_inc(x_80);
x_81 = lean_ctor_get(x_75, 1);
lean_inc(x_81);
x_82 = lean_ctor_get(x_75, 2);
lean_inc(x_82);
x_83 = lean_ctor_get(x_75, 3);
lean_inc(x_83);
lean_dec_ref(x_75);
x_33 = x_63;
x_34 = x_65;
x_35 = x_72;
x_36 = x_71;
x_37 = x_70;
x_38 = x_80;
x_39 = x_81;
x_40 = x_82;
x_41 = x_83;
x_42 = x_77;
x_43 = x_78;
x_44 = x_79;
x_45 = x_67;
x_46 = x_68;
x_47 = x_69;
goto block_51;
}
else
{
lean_object* x_84; 
x_84 = lean_ctor_get(x_73, 3);
lean_inc(x_84);
if (lean_obj_tag(x_84) == 1)
{
uint8_t x_85; 
x_85 = lean_ctor_get_uint8(x_84, sizeof(void*)*4);
if (x_85 == 0)
{
lean_object* x_86; lean_object* x_87; lean_object* x_88; lean_object* x_89; lean_object* x_90; lean_object* x_91; 
x_86 = lean_ctor_get(x_73, 1);
lean_inc(x_86);
x_87 = lean_ctor_get(x_73, 2);
lean_inc(x_87);
lean_dec_ref(x_73);
x_88 = lean_ctor_get(x_84, 0);
lean_inc(x_88);
x_89 = lean_ctor_get(x_84, 1);
lean_inc(x_89);
x_90 = lean_ctor_get(x_84, 2);
lean_inc(x_90);
x_91 = lean_ctor_get(x_84, 3);
lean_inc(x_91);
lean_dec_ref(x_84);
x_33 = x_63;
x_34 = x_65;
x_35 = x_72;
x_36 = x_71;
x_37 = x_70;
x_38 = x_75;
x_39 = x_86;
x_40 = x_87;
x_41 = x_88;
x_42 = x_89;
x_43 = x_90;
x_44 = x_91;
x_45 = x_67;
x_46 = x_68;
x_47 = x_69;
goto block_51;
}
else
{
lean_dec_ref(x_84);
lean_dec_ref(x_75);
x_52 = x_63;
x_53 = x_65;
x_54 = x_72;
x_55 = x_71;
x_56 = x_70;
x_57 = x_73;
x_58 = x_67;
x_59 = x_68;
x_60 = x_69;
goto block_62;
}
}
else
{
lean_dec(x_84);
lean_dec_ref(x_75);
x_52 = x_63;
x_53 = x_65;
x_54 = x_72;
x_55 = x_71;
x_56 = x_70;
x_57 = x_73;
x_58 = x_67;
x_59 = x_68;
x_60 = x_69;
goto block_62;
}
}
}
else
{
lean_object* x_92; 
x_92 = lean_ctor_get(x_73, 3);
lean_inc(x_92);
if (lean_obj_tag(x_92) == 1)
{
uint8_t x_93; 
x_93 = lean_ctor_get_uint8(x_92, sizeof(void*)*4);
if (x_93 == 0)
{
lean_object* x_94; lean_object* x_95; lean_object* x_96; lean_object* x_97; lean_object* x_98; lean_object* x_99; 
x_94 = lean_ctor_get(x_73, 1);
lean_inc(x_94);
x_95 = lean_ctor_get(x_73, 2);
lean_inc(x_95);
lean_dec_ref(x_73);
x_96 = lean_ctor_get(x_92, 0);
lean_inc(x_96);
x_97 = lean_ctor_get(x_92, 1);
lean_inc(x_97);
x_98 = lean_ctor_get(x_92, 2);
lean_inc(x_98);
x_99 = lean_ctor_get(x_92, 3);
lean_inc(x_99);
lean_dec_ref(x_92);
x_33 = x_63;
x_34 = x_65;
x_35 = x_72;
x_36 = x_71;
x_37 = x_70;
x_38 = x_75;
x_39 = x_94;
x_40 = x_95;
x_41 = x_96;
x_42 = x_97;
x_43 = x_98;
x_44 = x_99;
x_45 = x_67;
x_46 = x_68;
x_47 = x_69;
goto block_51;
}
else
{
lean_dec_ref(x_92);
lean_dec(x_75);
x_52 = x_63;
x_53 = x_65;
x_54 = x_72;
x_55 = x_71;
x_56 = x_70;
x_57 = x_73;
x_58 = x_67;
x_59 = x_68;
x_60 = x_69;
goto block_62;
}
}
else
{
lean_dec(x_92);
lean_dec(x_75);
x_52 = x_63;
x_53 = x_65;
x_54 = x_72;
x_55 = x_71;
x_56 = x_70;
x_57 = x_73;
x_58 = x_67;
x_59 = x_68;
x_60 = x_69;
goto block_62;
}
}
}
else
{
x_52 = x_63;
x_53 = x_65;
x_54 = x_72;
x_55 = x_71;
x_56 = x_70;
x_57 = x_73;
x_58 = x_67;
x_59 = x_68;
x_60 = x_69;
goto block_62;
}
}
else
{
x_52 = x_63;
x_53 = x_65;
x_54 = x_72;
x_55 = x_71;
x_56 = x_70;
x_57 = x_73;
x_58 = x_67;
x_59 = x_68;
x_60 = x_69;
goto block_62;
}
}
else
{
goto block_7;
}
}
else
{
goto block_7;
}
}
else
{
uint8_t x_100; 
x_100 = !lean_is_exclusive(x_1);
if (x_100 == 0)
{
lean_object* x_101; lean_object* x_102; lean_object* x_103; lean_object* x_104; uint8_t x_105; 
x_101 = lean_ctor_get(x_1, 0);
x_102 = lean_ctor_get(x_1, 1);
x_103 = lean_ctor_get(x_1, 2);
x_104 = lean_ctor_get(x_1, 3);
x_105 = 0;
lean_inc(x_104);
lean_inc(x_103);
lean_inc(x_102);
lean_inc(x_101);
lean_ctor_set_uint8(x_1, sizeof(void*)*4, x_105);
if (lean_obj_tag(x_101) == 1)
{
uint8_t x_106; 
x_106 = lean_ctor_get_uint8(x_101, sizeof(void*)*4);
if (x_106 == 0)
{
lean_object* x_107; lean_object* x_108; lean_object* x_109; lean_object* x_110; 
lean_dec_ref(x_1);
x_107 = lean_ctor_get(x_101, 0);
lean_inc(x_107);
x_108 = lean_ctor_get(x_101, 1);
lean_inc(x_108);
x_109 = lean_ctor_get(x_101, 2);
lean_inc(x_109);
x_110 = lean_ctor_get(x_101, 3);
lean_inc(x_110);
lean_dec_ref(x_101);
x_8 = x_63;
x_9 = x_107;
x_10 = x_108;
x_11 = x_109;
x_12 = x_110;
x_13 = x_102;
x_14 = x_103;
x_15 = x_104;
x_16 = x_2;
x_17 = x_3;
x_18 = x_4;
goto block_23;
}
else
{
if (lean_obj_tag(x_104) == 1)
{
uint8_t x_111; 
x_111 = lean_ctor_get_uint8(x_104, sizeof(void*)*4);
if (x_111 == 0)
{
lean_object* x_112; lean_object* x_113; lean_object* x_114; lean_object* x_115; 
lean_dec_ref(x_1);
x_112 = lean_ctor_get(x_104, 0);
lean_inc(x_112);
x_113 = lean_ctor_get(x_104, 1);
lean_inc(x_113);
x_114 = lean_ctor_get(x_104, 2);
lean_inc(x_114);
x_115 = lean_ctor_get(x_104, 3);
lean_inc(x_115);
lean_dec_ref(x_104);
x_8 = x_63;
x_9 = x_101;
x_10 = x_102;
x_11 = x_103;
x_12 = x_112;
x_13 = x_113;
x_14 = x_114;
x_15 = x_115;
x_16 = x_2;
x_17 = x_3;
x_18 = x_4;
goto block_23;
}
else
{
uint8_t x_116; 
lean_dec(x_103);
lean_dec(x_102);
lean_dec_ref(x_101);
x_116 = !lean_is_exclusive(x_104);
if (x_116 == 0)
{
lean_object* x_117; lean_object* x_118; lean_object* x_119; lean_object* x_120; 
x_117 = lean_ctor_get(x_104, 3);
lean_dec(x_117);
x_118 = lean_ctor_get(x_104, 2);
lean_dec(x_118);
x_119 = lean_ctor_get(x_104, 1);
lean_dec(x_119);
x_120 = lean_ctor_get(x_104, 0);
lean_dec(x_120);
lean_ctor_set(x_104, 3, x_4);
lean_ctor_set(x_104, 2, x_3);
lean_ctor_set(x_104, 1, x_2);
lean_ctor_set(x_104, 0, x_1);
lean_ctor_set_uint8(x_104, sizeof(void*)*4, x_63);
return x_104;
}
else
{
lean_object* x_121; 
lean_dec(x_104);
x_121 = lean_alloc_ctor(1, 4, 1);
lean_ctor_set(x_121, 0, x_1);
lean_ctor_set(x_121, 1, x_2);
lean_ctor_set(x_121, 2, x_3);
lean_ctor_set(x_121, 3, x_4);
lean_ctor_set_uint8(x_121, sizeof(void*)*4, x_63);
return x_121;
}
}
}
else
{
uint8_t x_122; 
lean_dec(x_104);
lean_dec(x_103);
lean_dec(x_102);
x_122 = !lean_is_exclusive(x_101);
if (x_122 == 0)
{
lean_object* x_123; lean_object* x_124; lean_object* x_125; lean_object* x_126; 
x_123 = lean_ctor_get(x_101, 3);
lean_dec(x_123);
x_124 = lean_ctor_get(x_101, 2);
lean_dec(x_124);
x_125 = lean_ctor_get(x_101, 1);
lean_dec(x_125);
x_126 = lean_ctor_get(x_101, 0);
lean_dec(x_126);
lean_ctor_set(x_101, 3, x_4);
lean_ctor_set(x_101, 2, x_3);
lean_ctor_set(x_101, 1, x_2);
lean_ctor_set(x_101, 0, x_1);
lean_ctor_set_uint8(x_101, sizeof(void*)*4, x_63);
return x_101;
}
else
{
lean_object* x_127; 
lean_dec(x_101);
x_127 = lean_alloc_ctor(1, 4, 1);
lean_ctor_set(x_127, 0, x_1);
lean_ctor_set(x_127, 1, x_2);
lean_ctor_set(x_127, 2, x_3);
lean_ctor_set(x_127, 3, x_4);
lean_ctor_set_uint8(x_127, sizeof(void*)*4, x_63);
return x_127;
}
}
}
}
else
{
if (lean_obj_tag(x_104) == 1)
{
uint8_t x_128; 
x_128 = lean_ctor_get_uint8(x_104, sizeof(void*)*4);
if (x_128 == 0)
{
lean_object* x_129; lean_object* x_130; lean_object* x_131; lean_object* x_132; 
lean_dec_ref(x_1);
x_129 = lean_ctor_get(x_104, 0);
lean_inc(x_129);
x_130 = lean_ctor_get(x_104, 1);
lean_inc(x_130);
x_131 = lean_ctor_get(x_104, 2);
lean_inc(x_131);
x_132 = lean_ctor_get(x_104, 3);
lean_inc(x_132);
lean_dec_ref(x_104);
x_8 = x_63;
x_9 = x_101;
x_10 = x_102;
x_11 = x_103;
x_12 = x_129;
x_13 = x_130;
x_14 = x_131;
x_15 = x_132;
x_16 = x_2;
x_17 = x_3;
x_18 = x_4;
goto block_23;
}
else
{
uint8_t x_133; 
lean_dec(x_103);
lean_dec(x_102);
lean_dec(x_101);
x_133 = !lean_is_exclusive(x_104);
if (x_133 == 0)
{
lean_object* x_134; lean_object* x_135; lean_object* x_136; lean_object* x_137; 
x_134 = lean_ctor_get(x_104, 3);
lean_dec(x_134);
x_135 = lean_ctor_get(x_104, 2);
lean_dec(x_135);
x_136 = lean_ctor_get(x_104, 1);
lean_dec(x_136);
x_137 = lean_ctor_get(x_104, 0);
lean_dec(x_137);
lean_ctor_set(x_104, 3, x_4);
lean_ctor_set(x_104, 2, x_3);
lean_ctor_set(x_104, 1, x_2);
lean_ctor_set(x_104, 0, x_1);
lean_ctor_set_uint8(x_104, sizeof(void*)*4, x_63);
return x_104;
}
else
{
lean_object* x_138; 
lean_dec(x_104);
x_138 = lean_alloc_ctor(1, 4, 1);
lean_ctor_set(x_138, 0, x_1);
lean_ctor_set(x_138, 1, x_2);
lean_ctor_set(x_138, 2, x_3);
lean_ctor_set(x_138, 3, x_4);
lean_ctor_set_uint8(x_138, sizeof(void*)*4, x_63);
return x_138;
}
}
}
else
{
lean_object* x_139; 
lean_dec(x_104);
lean_dec(x_103);
lean_dec(x_102);
lean_dec(x_101);
x_139 = lean_alloc_ctor(1, 4, 1);
lean_ctor_set(x_139, 0, x_1);
lean_ctor_set(x_139, 1, x_2);
lean_ctor_set(x_139, 2, x_3);
lean_ctor_set(x_139, 3, x_4);
lean_ctor_set_uint8(x_139, sizeof(void*)*4, x_63);
return x_139;
}
}
}
else
{
lean_object* x_140; lean_object* x_141; lean_object* x_142; lean_object* x_143; uint8_t x_144; lean_object* x_145; 
x_140 = lean_ctor_get(x_1, 0);
x_141 = lean_ctor_get(x_1, 1);
x_142 = lean_ctor_get(x_1, 2);
x_143 = lean_ctor_get(x_1, 3);
lean_inc(x_143);
lean_inc(x_142);
lean_inc(x_141);
lean_inc(x_140);
lean_dec(x_1);
x_144 = 0;
lean_inc(x_143);
lean_inc(x_142);
lean_inc(x_141);
lean_inc(x_140);
x_145 = lean_alloc_ctor(1, 4, 1);
lean_ctor_set(x_145, 0, x_140);
lean_ctor_set(x_145, 1, x_141);
lean_ctor_set(x_145, 2, x_142);
lean_ctor_set(x_145, 3, x_143);
lean_ctor_set_uint8(x_145, sizeof(void*)*4, x_144);
if (lean_obj_tag(x_140) == 1)
{
uint8_t x_146; 
x_146 = lean_ctor_get_uint8(x_140, sizeof(void*)*4);
if (x_146 == 0)
{
lean_object* x_147; lean_object* x_148; lean_object* x_149; lean_object* x_150; 
lean_dec_ref(x_145);
x_147 = lean_ctor_get(x_140, 0);
lean_inc(x_147);
x_148 = lean_ctor_get(x_140, 1);
lean_inc(x_148);
x_149 = lean_ctor_get(x_140, 2);
lean_inc(x_149);
x_150 = lean_ctor_get(x_140, 3);
lean_inc(x_150);
lean_dec_ref(x_140);
x_8 = x_63;
x_9 = x_147;
x_10 = x_148;
x_11 = x_149;
x_12 = x_150;
x_13 = x_141;
x_14 = x_142;
x_15 = x_143;
x_16 = x_2;
x_17 = x_3;
x_18 = x_4;
goto block_23;
}
else
{
if (lean_obj_tag(x_143) == 1)
{
uint8_t x_151; 
x_151 = lean_ctor_get_uint8(x_143, sizeof(void*)*4);
if (x_151 == 0)
{
lean_object* x_152; lean_object* x_153; lean_object* x_154; lean_object* x_155; 
lean_dec_ref(x_145);
x_152 = lean_ctor_get(x_143, 0);
lean_inc(x_152);
x_153 = lean_ctor_get(x_143, 1);
lean_inc(x_153);
x_154 = lean_ctor_get(x_143, 2);
lean_inc(x_154);
x_155 = lean_ctor_get(x_143, 3);
lean_inc(x_155);
lean_dec_ref(x_143);
x_8 = x_63;
x_9 = x_140;
x_10 = x_141;
x_11 = x_142;
x_12 = x_152;
x_13 = x_153;
x_14 = x_154;
x_15 = x_155;
x_16 = x_2;
x_17 = x_3;
x_18 = x_4;
goto block_23;
}
else
{
lean_object* x_156; lean_object* x_157; 
lean_dec(x_142);
lean_dec(x_141);
lean_dec_ref(x_140);
if (lean_is_exclusive(x_143)) {
 lean_ctor_release(x_143, 0);
 lean_ctor_release(x_143, 1);
 lean_ctor_release(x_143, 2);
 lean_ctor_release(x_143, 3);
 x_156 = x_143;
} else {
 lean_dec_ref(x_143);
 x_156 = lean_box(0);
}
if (lean_is_scalar(x_156)) {
 x_157 = lean_alloc_ctor(1, 4, 1);
} else {
 x_157 = x_156;
}
lean_ctor_set(x_157, 0, x_145);
lean_ctor_set(x_157, 1, x_2);
lean_ctor_set(x_157, 2, x_3);
lean_ctor_set(x_157, 3, x_4);
lean_ctor_set_uint8(x_157, sizeof(void*)*4, x_63);
return x_157;
}
}
else
{
lean_object* x_158; lean_object* x_159; 
lean_dec(x_143);
lean_dec(x_142);
lean_dec(x_141);
if (lean_is_exclusive(x_140)) {
 lean_ctor_release(x_140, 0);
 lean_ctor_release(x_140, 1);
 lean_ctor_release(x_140, 2);
 lean_ctor_release(x_140, 3);
 x_158 = x_140;
} else {
 lean_dec_ref(x_140);
 x_158 = lean_box(0);
}
if (lean_is_scalar(x_158)) {
 x_159 = lean_alloc_ctor(1, 4, 1);
} else {
 x_159 = x_158;
}
lean_ctor_set(x_159, 0, x_145);
lean_ctor_set(x_159, 1, x_2);
lean_ctor_set(x_159, 2, x_3);
lean_ctor_set(x_159, 3, x_4);
lean_ctor_set_uint8(x_159, sizeof(void*)*4, x_63);
return x_159;
}
}
}
else
{
if (lean_obj_tag(x_143) == 1)
{
uint8_t x_160; 
x_160 = lean_ctor_get_uint8(x_143, sizeof(void*)*4);
if (x_160 == 0)
{
lean_object* x_161; lean_object* x_162; lean_object* x_163; lean_object* x_164; 
lean_dec_ref(x_145);
x_161 = lean_ctor_get(x_143, 0);
lean_inc(x_161);
x_162 = lean_ctor_get(x_143, 1);
lean_inc(x_162);
x_163 = lean_ctor_get(x_143, 2);
lean_inc(x_163);
x_164 = lean_ctor_get(x_143, 3);
lean_inc(x_164);
lean_dec_ref(x_143);
x_8 = x_63;
x_9 = x_140;
x_10 = x_141;
x_11 = x_142;
x_12 = x_161;
x_13 = x_162;
x_14 = x_163;
x_15 = x_164;
x_16 = x_2;
x_17 = x_3;
x_18 = x_4;
goto block_23;
}
else
{
lean_object* x_165; lean_object* x_166; 
lean_dec(x_142);
lean_dec(x_141);
lean_dec(x_140);
if (lean_is_exclusive(x_143)) {
 lean_ctor_release(x_143, 0);
 lean_ctor_release(x_143, 1);
 lean_ctor_release(x_143, 2);
 lean_ctor_release(x_143, 3);
 x_165 = x_143;
} else {
 lean_dec_ref(x_143);
 x_165 = lean_box(0);
}
if (lean_is_scalar(x_165)) {
 x_166 = lean_alloc_ctor(1, 4, 1);
} else {
 x_166 = x_165;
}
lean_ctor_set(x_166, 0, x_145);
lean_ctor_set(x_166, 1, x_2);
lean_ctor_set(x_166, 2, x_3);
lean_ctor_set(x_166, 3, x_4);
lean_ctor_set_uint8(x_166, sizeof(void*)*4, x_63);
return x_166;
}
}
else
{
lean_object* x_167; 
lean_dec(x_143);
lean_dec(x_142);
lean_dec(x_141);
lean_dec(x_140);
x_167 = lean_alloc_ctor(1, 4, 1);
lean_ctor_set(x_167, 0, x_145);
lean_ctor_set(x_167, 1, x_2);
lean_ctor_set(x_167, 2, x_3);
lean_ctor_set(x_167, 3, x_4);
lean_ctor_set_uint8(x_167, sizeof(void*)*4, x_63);
return x_167;
}
}
}
}
}
else
{
goto block_7;
}
}
}
}
LEAN_EXPORT lean_object* l_Lean_RBNode_balRight(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6) {
_start:
{
lean_object* x_7; 
x_7 = l_Lean_RBNode_balRight___redArg(x_3, x_4, x_5, x_6);
return x_7;
}
}
LEAN_EXPORT lean_object* l_Lean_RBNode_size___redArg(lean_object* x_1) {
_start:
{
if (lean_obj_tag(x_1) == 0)
{
lean_object* x_2; 
x_2 = lean_unsigned_to_nat(0u);
return x_2;
}
else
{
lean_object* x_3; lean_object* x_4; lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; 
x_3 = lean_ctor_get(x_1, 0);
x_4 = lean_ctor_get(x_1, 3);
x_5 = l_Lean_RBNode_size___redArg(x_3);
x_6 = l_Lean_RBNode_size___redArg(x_4);
x_7 = lean_nat_add(x_5, x_6);
lean_dec(x_6);
lean_dec(x_5);
x_8 = lean_unsigned_to_nat(1u);
x_9 = lean_nat_add(x_7, x_8);
lean_dec(x_7);
return x_9;
}
}
}
LEAN_EXPORT lean_object* l_Lean_RBNode_size(lean_object* x_1, lean_object* x_2, lean_object* x_3) {
_start:
{
lean_object* x_4; 
x_4 = l_Lean_RBNode_size___redArg(x_3);
return x_4;
}
}
LEAN_EXPORT lean_object* l_Lean_RBNode_size___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) {
_start:
{
lean_object* x_4; 
x_4 = l_Lean_RBNode_size(x_1, x_2, x_3);
lean_dec(x_3);
return x_4;
}
}
LEAN_EXPORT lean_object* l_Lean_RBNode_size___redArg___boxed(lean_object* x_1) {
_start:
{
lean_object* x_2; 
x_2 = l_Lean_RBNode_size___redArg(x_1);
lean_dec(x_1);
return x_2;
}
}
LEAN_EXPORT lean_object* l___private_Lean_Data_RBMap_0__Lean_RBNode_depth_match__1_splitter___redArg(lean_object* x_1, lean_object* x_2, lean_object* x_3) {
_start:
{
if (lean_obj_tag(x_1) == 0)
{
lean_object* x_4; lean_object* x_5; 
lean_dec(x_3);
x_4 = lean_box(0);
x_5 = lean_apply_1(x_2, x_4);
return x_5;
}
else
{
uint8_t x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; 
lean_dec(x_2);
x_6 = lean_ctor_get_uint8(x_1, sizeof(void*)*4);
x_7 = lean_ctor_get(x_1, 0);
lean_inc(x_7);
x_8 = lean_ctor_get(x_1, 1);
lean_inc(x_8);
x_9 = lean_ctor_get(x_1, 2);
lean_inc(x_9);
x_10 = lean_ctor_get(x_1, 3);
lean_inc(x_10);
lean_dec_ref(x_1);
x_11 = lean_box(x_6);
x_12 = lean_apply_5(x_3, x_11, x_7, x_8, x_9, x_10);
return x_12;
}
}
}
LEAN_EXPORT lean_object* l___private_Lean_Data_RBMap_0__Lean_RBNode_depth_match__1_splitter(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6) {
_start:
{
lean_object* x_7; 
x_7 = l___private_Lean_Data_RBMap_0__Lean_RBNode_depth_match__1_splitter___redArg(x_4, x_5, x_6);
return x_7;
}
}
LEAN_EXPORT lean_object* l_Lean_RBNode_appendTrees___redArg(lean_object* x_1, lean_object* x_2) {
_start:
{
if (lean_obj_tag(x_1) == 0)
{
return x_2;
}
else
{
if (lean_obj_tag(x_2) == 0)
{
return x_1;
}
else
{
uint8_t x_3; lean_object* x_4; lean_object* x_5; lean_object* x_6; lean_object* x_7; uint8_t x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_17; 
x_3 = lean_ctor_get_uint8(x_1, sizeof(void*)*4);
x_4 = lean_ctor_get(x_1, 0);
x_5 = lean_ctor_get(x_1, 1);
x_6 = lean_ctor_get(x_1, 2);
x_7 = lean_ctor_get(x_1, 3);
x_8 = lean_ctor_get_uint8(x_2, sizeof(void*)*4);
x_9 = lean_ctor_get(x_2, 0);
x_10 = lean_ctor_get(x_2, 1);
x_11 = lean_ctor_get(x_2, 2);
x_12 = lean_ctor_get(x_2, 3);
if (x_8 == 0)
{
uint8_t x_21; 
lean_inc(x_12);
lean_inc(x_11);
lean_inc(x_10);
lean_inc(x_9);
x_21 = !lean_is_exclusive(x_2);
if (x_21 == 0)
{
lean_object* x_22; lean_object* x_23; lean_object* x_24; lean_object* x_25; 
x_22 = lean_ctor_get(x_2, 3);
lean_dec(x_22);
x_23 = lean_ctor_get(x_2, 2);
lean_dec(x_23);
x_24 = lean_ctor_get(x_2, 1);
lean_dec(x_24);
x_25 = lean_ctor_get(x_2, 0);
lean_dec(x_25);
if (x_3 == 0)
{
uint8_t x_26; 
lean_inc(x_7);
lean_inc(x_6);
lean_inc(x_5);
lean_inc(x_4);
x_26 = !lean_is_exclusive(x_1);
if (x_26 == 0)
{
lean_object* x_27; lean_object* x_28; lean_object* x_29; lean_object* x_30; lean_object* x_31; 
x_27 = lean_ctor_get(x_1, 3);
lean_dec(x_27);
x_28 = lean_ctor_get(x_1, 2);
lean_dec(x_28);
x_29 = lean_ctor_get(x_1, 1);
lean_dec(x_29);
x_30 = lean_ctor_get(x_1, 0);
lean_dec(x_30);
x_31 = l_Lean_RBNode_appendTrees___redArg(x_7, x_9);
if (lean_obj_tag(x_31) == 1)
{
uint8_t x_32; 
x_32 = lean_ctor_get_uint8(x_31, sizeof(void*)*4);
if (x_32 == 0)
{
uint8_t x_33; 
x_33 = !lean_is_exclusive(x_31);
if (x_33 == 0)
{
lean_object* x_34; lean_object* x_35; lean_object* x_36; lean_object* x_37; 
x_34 = lean_ctor_get(x_31, 0);
x_35 = lean_ctor_get(x_31, 1);
x_36 = lean_ctor_get(x_31, 2);
x_37 = lean_ctor_get(x_31, 3);
lean_ctor_set(x_31, 3, x_34);
lean_ctor_set(x_31, 2, x_6);
lean_ctor_set(x_31, 1, x_5);
lean_ctor_set(x_31, 0, x_4);
lean_ctor_set(x_2, 0, x_37);
lean_ctor_set_uint8(x_2, sizeof(void*)*4, x_32);
lean_ctor_set(x_1, 3, x_2);
lean_ctor_set(x_1, 2, x_36);
lean_ctor_set(x_1, 1, x_35);
lean_ctor_set(x_1, 0, x_31);
lean_ctor_set_uint8(x_1, sizeof(void*)*4, x_32);
return x_1;
}
else
{
lean_object* x_38; lean_object* x_39; lean_object* x_40; lean_object* x_41; lean_object* x_42; 
x_38 = lean_ctor_get(x_31, 0);
x_39 = lean_ctor_get(x_31, 1);
x_40 = lean_ctor_get(x_31, 2);
x_41 = lean_ctor_get(x_31, 3);
lean_inc(x_41);
lean_inc(x_40);
lean_inc(x_39);
lean_inc(x_38);
lean_dec(x_31);
x_42 = lean_alloc_ctor(1, 4, 1);
lean_ctor_set(x_42, 0, x_4);
lean_ctor_set(x_42, 1, x_5);
lean_ctor_set(x_42, 2, x_6);
lean_ctor_set(x_42, 3, x_38);
lean_ctor_set_uint8(x_42, sizeof(void*)*4, x_32);
lean_ctor_set(x_2, 0, x_41);
lean_ctor_set_uint8(x_2, sizeof(void*)*4, x_32);
lean_ctor_set(x_1, 3, x_2);
lean_ctor_set(x_1, 2, x_40);
lean_ctor_set(x_1, 1, x_39);
lean_ctor_set(x_1, 0, x_42);
lean_ctor_set_uint8(x_1, sizeof(void*)*4, x_32);
return x_1;
}
}
else
{
lean_free_object(x_1);
lean_free_object(x_2);
x_17 = x_31;
goto block_20;
}
}
else
{
lean_free_object(x_1);
lean_free_object(x_2);
x_17 = x_31;
goto block_20;
}
}
else
{
lean_object* x_43; 
lean_dec(x_1);
x_43 = l_Lean_RBNode_appendTrees___redArg(x_7, x_9);
if (lean_obj_tag(x_43) == 1)
{
uint8_t x_44; 
x_44 = lean_ctor_get_uint8(x_43, sizeof(void*)*4);
if (x_44 == 0)
{
lean_object* x_45; lean_object* x_46; lean_object* x_47; lean_object* x_48; lean_object* x_49; lean_object* x_50; lean_object* x_51; 
x_45 = lean_ctor_get(x_43, 0);
lean_inc(x_45);
x_46 = lean_ctor_get(x_43, 1);
lean_inc(x_46);
x_47 = lean_ctor_get(x_43, 2);
lean_inc(x_47);
x_48 = lean_ctor_get(x_43, 3);
lean_inc(x_48);
if (lean_is_exclusive(x_43)) {
 lean_ctor_release(x_43, 0);
 lean_ctor_release(x_43, 1);
 lean_ctor_release(x_43, 2);
 lean_ctor_release(x_43, 3);
 x_49 = x_43;
} else {
 lean_dec_ref(x_43);
 x_49 = lean_box(0);
}
if (lean_is_scalar(x_49)) {
 x_50 = lean_alloc_ctor(1, 4, 1);
} else {
 x_50 = x_49;
}
lean_ctor_set(x_50, 0, x_4);
lean_ctor_set(x_50, 1, x_5);
lean_ctor_set(x_50, 2, x_6);
lean_ctor_set(x_50, 3, x_45);
lean_ctor_set_uint8(x_50, sizeof(void*)*4, x_44);
lean_ctor_set(x_2, 0, x_48);
lean_ctor_set_uint8(x_2, sizeof(void*)*4, x_44);
x_51 = lean_alloc_ctor(1, 4, 1);
lean_ctor_set(x_51, 0, x_50);
lean_ctor_set(x_51, 1, x_46);
lean_ctor_set(x_51, 2, x_47);
lean_ctor_set(x_51, 3, x_2);
lean_ctor_set_uint8(x_51, sizeof(void*)*4, x_44);
return x_51;
}
else
{
lean_free_object(x_2);
x_17 = x_43;
goto block_20;
}
}
else
{
lean_free_object(x_2);
x_17 = x_43;
goto block_20;
}
}
}
else
{
lean_object* x_52; 
x_52 = l_Lean_RBNode_appendTrees___redArg(x_1, x_9);
lean_ctor_set(x_2, 0, x_52);
return x_2;
}
}
else
{
lean_dec(x_2);
if (x_3 == 0)
{
lean_object* x_53; lean_object* x_54; 
lean_inc(x_7);
lean_inc(x_6);
lean_inc(x_5);
lean_inc(x_4);
if (lean_is_exclusive(x_1)) {
 lean_ctor_release(x_1, 0);
 lean_ctor_release(x_1, 1);
 lean_ctor_release(x_1, 2);
 lean_ctor_release(x_1, 3);
 x_53 = x_1;
} else {
 lean_dec_ref(x_1);
 x_53 = lean_box(0);
}
x_54 = l_Lean_RBNode_appendTrees___redArg(x_7, x_9);
if (lean_obj_tag(x_54) == 1)
{
uint8_t x_55; 
x_55 = lean_ctor_get_uint8(x_54, sizeof(void*)*4);
if (x_55 == 0)
{
lean_object* x_56; lean_object* x_57; lean_object* x_58; lean_object* x_59; lean_object* x_60; lean_object* x_61; lean_object* x_62; lean_object* x_63; 
x_56 = lean_ctor_get(x_54, 0);
lean_inc(x_56);
x_57 = lean_ctor_get(x_54, 1);
lean_inc(x_57);
x_58 = lean_ctor_get(x_54, 2);
lean_inc(x_58);
x_59 = lean_ctor_get(x_54, 3);
lean_inc(x_59);
if (lean_is_exclusive(x_54)) {
 lean_ctor_release(x_54, 0);
 lean_ctor_release(x_54, 1);
 lean_ctor_release(x_54, 2);
 lean_ctor_release(x_54, 3);
 x_60 = x_54;
} else {
 lean_dec_ref(x_54);
 x_60 = lean_box(0);
}
if (lean_is_scalar(x_60)) {
 x_61 = lean_alloc_ctor(1, 4, 1);
} else {
 x_61 = x_60;
}
lean_ctor_set(x_61, 0, x_4);
lean_ctor_set(x_61, 1, x_5);
lean_ctor_set(x_61, 2, x_6);
lean_ctor_set(x_61, 3, x_56);
lean_ctor_set_uint8(x_61, sizeof(void*)*4, x_55);
x_62 = lean_alloc_ctor(1, 4, 1);
lean_ctor_set(x_62, 0, x_59);
lean_ctor_set(x_62, 1, x_10);
lean_ctor_set(x_62, 2, x_11);
lean_ctor_set(x_62, 3, x_12);
lean_ctor_set_uint8(x_62, sizeof(void*)*4, x_55);
if (lean_is_scalar(x_53)) {
 x_63 = lean_alloc_ctor(1, 4, 1);
} else {
 x_63 = x_53;
}
lean_ctor_set(x_63, 0, x_61);
lean_ctor_set(x_63, 1, x_57);
lean_ctor_set(x_63, 2, x_58);
lean_ctor_set(x_63, 3, x_62);
lean_ctor_set_uint8(x_63, sizeof(void*)*4, x_55);
return x_63;
}
else
{
lean_dec(x_53);
x_17 = x_54;
goto block_20;
}
}
else
{
lean_dec(x_53);
x_17 = x_54;
goto block_20;
}
}
else
{
lean_object* x_64; lean_object* x_65; 
x_64 = l_Lean_RBNode_appendTrees___redArg(x_1, x_9);
x_65 = lean_alloc_ctor(1, 4, 1);
lean_ctor_set(x_65, 0, x_64);
lean_ctor_set(x_65, 1, x_10);
lean_ctor_set(x_65, 2, x_11);
lean_ctor_set(x_65, 3, x_12);
lean_ctor_set_uint8(x_65, sizeof(void*)*4, x_8);
return x_65;
}
}
}
else
{
uint8_t x_66; 
lean_inc(x_7);
lean_inc(x_6);
lean_inc(x_5);
lean_inc(x_4);
x_66 = !lean_is_exclusive(x_1);
if (x_66 == 0)
{
lean_object* x_67; lean_object* x_68; lean_object* x_69; lean_object* x_70; 
x_67 = lean_ctor_get(x_1, 3);
lean_dec(x_67);
x_68 = lean_ctor_get(x_1, 2);
lean_dec(x_68);
x_69 = lean_ctor_get(x_1, 1);
lean_dec(x_69);
x_70 = lean_ctor_get(x_1, 0);
lean_dec(x_70);
if (x_3 == 0)
{
lean_object* x_71; 
x_71 = l_Lean_RBNode_appendTrees___redArg(x_7, x_2);
lean_ctor_set(x_1, 3, x_71);
return x_1;
}
else
{
uint8_t x_72; 
lean_inc(x_12);
lean_inc(x_11);
lean_inc(x_10);
lean_inc(x_9);
x_72 = !lean_is_exclusive(x_2);
if (x_72 == 0)
{
lean_object* x_73; lean_object* x_74; lean_object* x_75; lean_object* x_76; lean_object* x_77; 
x_73 = lean_ctor_get(x_2, 3);
lean_dec(x_73);
x_74 = lean_ctor_get(x_2, 2);
lean_dec(x_74);
x_75 = lean_ctor_get(x_2, 1);
lean_dec(x_75);
x_76 = lean_ctor_get(x_2, 0);
lean_dec(x_76);
x_77 = l_Lean_RBNode_appendTrees___redArg(x_7, x_9);
if (lean_obj_tag(x_77) == 1)
{
uint8_t x_78; 
x_78 = lean_ctor_get_uint8(x_77, sizeof(void*)*4);
if (x_78 == 0)
{
uint8_t x_79; 
x_79 = !lean_is_exclusive(x_77);
if (x_79 == 0)
{
lean_object* x_80; lean_object* x_81; lean_object* x_82; lean_object* x_83; 
x_80 = lean_ctor_get(x_77, 0);
x_81 = lean_ctor_get(x_77, 1);
x_82 = lean_ctor_get(x_77, 2);
x_83 = lean_ctor_get(x_77, 3);
lean_ctor_set(x_77, 3, x_80);
lean_ctor_set(x_77, 2, x_6);
lean_ctor_set(x_77, 1, x_5);
lean_ctor_set(x_77, 0, x_4);
lean_ctor_set_uint8(x_77, sizeof(void*)*4, x_3);
lean_ctor_set(x_2, 0, x_83);
lean_ctor_set_uint8(x_2, sizeof(void*)*4, x_3);
lean_ctor_set(x_1, 3, x_2);
lean_ctor_set(x_1, 2, x_82);
lean_ctor_set(x_1, 1, x_81);
lean_ctor_set(x_1, 0, x_77);
lean_ctor_set_uint8(x_1, sizeof(void*)*4, x_78);
return x_1;
}
else
{
lean_object* x_84; lean_object* x_85; lean_object* x_86; lean_object* x_87; lean_object* x_88; 
x_84 = lean_ctor_get(x_77, 0);
x_85 = lean_ctor_get(x_77, 1);
x_86 = lean_ctor_get(x_77, 2);
x_87 = lean_ctor_get(x_77, 3);
lean_inc(x_87);
lean_inc(x_86);
lean_inc(x_85);
lean_inc(x_84);
lean_dec(x_77);
x_88 = lean_alloc_ctor(1, 4, 1);
lean_ctor_set(x_88, 0, x_4);
lean_ctor_set(x_88, 1, x_5);
lean_ctor_set(x_88, 2, x_6);
lean_ctor_set(x_88, 3, x_84);
lean_ctor_set_uint8(x_88, sizeof(void*)*4, x_3);
lean_ctor_set(x_2, 0, x_87);
lean_ctor_set_uint8(x_2, sizeof(void*)*4, x_3);
lean_ctor_set(x_1, 3, x_2);
lean_ctor_set(x_1, 2, x_86);
lean_ctor_set(x_1, 1, x_85);
lean_ctor_set(x_1, 0, x_88);
lean_ctor_set_uint8(x_1, sizeof(void*)*4, x_78);
return x_1;
}
}
else
{
lean_free_object(x_2);
lean_free_object(x_1);
x_13 = x_77;
goto block_16;
}
}
else
{
lean_free_object(x_2);
lean_free_object(x_1);
x_13 = x_77;
goto block_16;
}
}
else
{
lean_object* x_89; 
lean_dec(x_2);
x_89 = l_Lean_RBNode_appendTrees___redArg(x_7, x_9);
if (lean_obj_tag(x_89) == 1)
{
uint8_t x_90; 
x_90 = lean_ctor_get_uint8(x_89, sizeof(void*)*4);
if (x_90 == 0)
{
lean_object* x_91; lean_object* x_92; lean_object* x_93; lean_object* x_94; lean_object* x_95; lean_object* x_96; lean_object* x_97; 
x_91 = lean_ctor_get(x_89, 0);
lean_inc(x_91);
x_92 = lean_ctor_get(x_89, 1);
lean_inc(x_92);
x_93 = lean_ctor_get(x_89, 2);
lean_inc(x_93);
x_94 = lean_ctor_get(x_89, 3);
lean_inc(x_94);
if (lean_is_exclusive(x_89)) {
 lean_ctor_release(x_89, 0);
 lean_ctor_release(x_89, 1);
 lean_ctor_release(x_89, 2);
 lean_ctor_release(x_89, 3);
 x_95 = x_89;
} else {
 lean_dec_ref(x_89);
 x_95 = lean_box(0);
}
if (lean_is_scalar(x_95)) {
 x_96 = lean_alloc_ctor(1, 4, 1);
} else {
 x_96 = x_95;
}
lean_ctor_set(x_96, 0, x_4);
lean_ctor_set(x_96, 1, x_5);
lean_ctor_set(x_96, 2, x_6);
lean_ctor_set(x_96, 3, x_91);
lean_ctor_set_uint8(x_96, sizeof(void*)*4, x_3);
x_97 = lean_alloc_ctor(1, 4, 1);
lean_ctor_set(x_97, 0, x_94);
lean_ctor_set(x_97, 1, x_10);
lean_ctor_set(x_97, 2, x_11);
lean_ctor_set(x_97, 3, x_12);
lean_ctor_set_uint8(x_97, sizeof(void*)*4, x_3);
lean_ctor_set(x_1, 3, x_97);
lean_ctor_set(x_1, 2, x_93);
lean_ctor_set(x_1, 1, x_92);
lean_ctor_set(x_1, 0, x_96);
lean_ctor_set_uint8(x_1, sizeof(void*)*4, x_90);
return x_1;
}
else
{
lean_free_object(x_1);
x_13 = x_89;
goto block_16;
}
}
else
{
lean_free_object(x_1);
x_13 = x_89;
goto block_16;
}
}
}
}
else
{
lean_dec(x_1);
if (x_3 == 0)
{
lean_object* x_98; lean_object* x_99; 
x_98 = l_Lean_RBNode_appendTrees___redArg(x_7, x_2);
x_99 = lean_alloc_ctor(1, 4, 1);
lean_ctor_set(x_99, 0, x_4);
lean_ctor_set(x_99, 1, x_5);
lean_ctor_set(x_99, 2, x_6);
lean_ctor_set(x_99, 3, x_98);
lean_ctor_set_uint8(x_99, sizeof(void*)*4, x_3);
return x_99;
}
else
{
lean_object* x_100; lean_object* x_101; 
lean_inc(x_12);
lean_inc(x_11);
lean_inc(x_10);
lean_inc(x_9);
if (lean_is_exclusive(x_2)) {
 lean_ctor_release(x_2, 0);
 lean_ctor_release(x_2, 1);
 lean_ctor_release(x_2, 2);
 lean_ctor_release(x_2, 3);
 x_100 = x_2;
} else {
 lean_dec_ref(x_2);
 x_100 = lean_box(0);
}
x_101 = l_Lean_RBNode_appendTrees___redArg(x_7, x_9);
if (lean_obj_tag(x_101) == 1)
{
uint8_t x_102; 
x_102 = lean_ctor_get_uint8(x_101, sizeof(void*)*4);
if (x_102 == 0)
{
lean_object* x_103; lean_object* x_104; lean_object* x_105; lean_object* x_106; lean_object* x_107; lean_object* x_108; lean_object* x_109; lean_object* x_110; 
x_103 = lean_ctor_get(x_101, 0);
lean_inc(x_103);
x_104 = lean_ctor_get(x_101, 1);
lean_inc(x_104);
x_105 = lean_ctor_get(x_101, 2);
lean_inc(x_105);
x_106 = lean_ctor_get(x_101, 3);
lean_inc(x_106);
if (lean_is_exclusive(x_101)) {
 lean_ctor_release(x_101, 0);
 lean_ctor_release(x_101, 1);
 lean_ctor_release(x_101, 2);
 lean_ctor_release(x_101, 3);
 x_107 = x_101;
} else {
 lean_dec_ref(x_101);
 x_107 = lean_box(0);
}
if (lean_is_scalar(x_107)) {
 x_108 = lean_alloc_ctor(1, 4, 1);
} else {
 x_108 = x_107;
}
lean_ctor_set(x_108, 0, x_4);
lean_ctor_set(x_108, 1, x_5);
lean_ctor_set(x_108, 2, x_6);
lean_ctor_set(x_108, 3, x_103);
lean_ctor_set_uint8(x_108, sizeof(void*)*4, x_3);
if (lean_is_scalar(x_100)) {
 x_109 = lean_alloc_ctor(1, 4, 1);
} else {
 x_109 = x_100;
}
lean_ctor_set(x_109, 0, x_106);
lean_ctor_set(x_109, 1, x_10);
lean_ctor_set(x_109, 2, x_11);
lean_ctor_set(x_109, 3, x_12);
lean_ctor_set_uint8(x_109, sizeof(void*)*4, x_3);
x_110 = lean_alloc_ctor(1, 4, 1);
lean_ctor_set(x_110, 0, x_108);
lean_ctor_set(x_110, 1, x_104);
lean_ctor_set(x_110, 2, x_105);
lean_ctor_set(x_110, 3, x_109);
lean_ctor_set_uint8(x_110, sizeof(void*)*4, x_102);
return x_110;
}
else
{
lean_dec(x_100);
x_13 = x_101;
goto block_16;
}
}
else
{
lean_dec(x_100);
x_13 = x_101;
goto block_16;
}
}
}
}
block_16:
{
lean_object* x_14; lean_object* x_15; 
x_14 = lean_alloc_ctor(1, 4, 1);
lean_ctor_set(x_14, 0, x_13);
lean_ctor_set(x_14, 1, x_10);
lean_ctor_set(x_14, 2, x_11);
lean_ctor_set(x_14, 3, x_12);
lean_ctor_set_uint8(x_14, sizeof(void*)*4, x_3);
x_15 = l_Lean_RBNode_balLeft___redArg(x_4, x_5, x_6, x_14);
return x_15;
}
block_20:
{
lean_object* x_18; lean_object* x_19; 
x_18 = lean_alloc_ctor(1, 4, 1);
lean_ctor_set(x_18, 0, x_17);
lean_ctor_set(x_18, 1, x_10);
lean_ctor_set(x_18, 2, x_11);
lean_ctor_set(x_18, 3, x_12);
lean_ctor_set_uint8(x_18, sizeof(void*)*4, x_3);
x_19 = lean_alloc_ctor(1, 4, 1);
lean_ctor_set(x_19, 0, x_4);
lean_ctor_set(x_19, 1, x_5);
lean_ctor_set(x_19, 2, x_6);
lean_ctor_set(x_19, 3, x_18);
lean_ctor_set_uint8(x_19, sizeof(void*)*4, x_3);
return x_19;
}
}
}
}
}
LEAN_EXPORT lean_object* l_Lean_RBNode_appendTrees(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) {
_start:
{
lean_object* x_5; 
x_5 = l_Lean_RBNode_appendTrees___redArg(x_3, x_4);
return x_5;
}
}
LEAN_EXPORT lean_object* l___private_Lean_Data_RBMap_0__Lean_RBNode_appendTrees_match__1_splitter(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9, lean_object* x_10, lean_object* x_11) {
_start:
{
if (lean_obj_tag(x_4) == 0)
{
lean_object* x_12; 
lean_dec(x_11);
lean_dec(x_10);
lean_dec(x_9);
lean_dec(x_8);
lean_dec(x_7);
x_12 = lean_apply_1(x_6, x_5);
return x_12;
}
else
{
lean_dec(x_6);
if (lean_obj_tag(x_5) == 0)
{
lean_object* x_13; 
lean_dec(x_11);
lean_dec(x_10);
lean_dec(x_9);
lean_dec(x_8);
x_13 = lean_apply_2(x_7, x_4, lean_box(0));
return x_13;
}
else
{
uint8_t x_14; 
lean_dec(x_7);
x_14 = lean_ctor_get_uint8(x_5, sizeof(void*)*4);
if (x_14 == 0)
{
uint8_t x_15; 
lean_dec(x_11);
lean_dec(x_9);
x_15 = lean_ctor_get_uint8(x_4, sizeof(void*)*4);
if (x_15 == 0)
{
lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; lean_object* x_21; lean_object* x_22; lean_object* x_23; lean_object* x_24; 
lean_dec(x_10);
x_16 = lean_ctor_get(x_4, 0);
lean_inc(x_16);
x_17 = lean_ctor_get(x_4, 1);
lean_inc(x_17);
x_18 = lean_ctor_get(x_4, 2);
lean_inc(x_18);
x_19 = lean_ctor_get(x_4, 3);
lean_inc(x_19);
lean_dec_ref(x_4);
x_20 = lean_ctor_get(x_5, 0);
lean_inc(x_20);
x_21 = lean_ctor_get(x_5, 1);
lean_inc(x_21);
x_22 = lean_ctor_get(x_5, 2);
lean_inc(x_22);
x_23 = lean_ctor_get(x_5, 3);
lean_inc(x_23);
lean_dec_ref(x_5);
x_24 = lean_apply_8(x_8, x_16, x_17, x_18, x_19, x_20, x_21, x_22, x_23);
return x_24;
}
else
{
lean_object* x_25; lean_object* x_26; lean_object* x_27; lean_object* x_28; lean_object* x_29; 
lean_dec(x_8);
x_25 = lean_ctor_get(x_5, 0);
lean_inc(x_25);
x_26 = lean_ctor_get(x_5, 1);
lean_inc(x_26);
x_27 = lean_ctor_get(x_5, 2);
lean_inc(x_27);
x_28 = lean_ctor_get(x_5, 3);
lean_inc(x_28);
lean_dec_ref(x_5);
x_29 = lean_apply_7(x_10, x_4, x_25, x_26, x_27, x_28, lean_box(0), lean_box(0));
return x_29;
}
}
else
{
uint8_t x_30; 
lean_dec(x_10);
lean_dec(x_8);
x_30 = lean_ctor_get_uint8(x_4, sizeof(void*)*4);
if (x_30 == 0)
{
lean_object* x_31; lean_object* x_32; lean_object* x_33; lean_object* x_34; lean_object* x_35; 
lean_dec(x_9);
x_31 = lean_ctor_get(x_4, 0);
lean_inc(x_31);
x_32 = lean_ctor_get(x_4, 1);
lean_inc(x_32);
x_33 = lean_ctor_get(x_4, 2);
lean_inc(x_33);
x_34 = lean_ctor_get(x_4, 3);
lean_inc(x_34);
lean_dec_ref(x_4);
x_35 = lean_apply_7(x_11, x_31, x_32, x_33, x_34, x_5, lean_box(0), lean_box(0));
return x_35;
}
else
{
lean_object* x_36; lean_object* x_37; lean_object* x_38; lean_object* x_39; lean_object* x_40; lean_object* x_41; lean_object* x_42; lean_object* x_43; lean_object* x_44; 
lean_dec(x_11);
x_36 = lean_ctor_get(x_4, 0);
lean_inc(x_36);
x_37 = lean_ctor_get(x_4, 1);
lean_inc(x_37);
x_38 = lean_ctor_get(x_4, 2);
lean_inc(x_38);
x_39 = lean_ctor_get(x_4, 3);
lean_inc(x_39);
lean_dec_ref(x_4);
x_40 = lean_ctor_get(x_5, 0);
lean_inc(x_40);
x_41 = lean_ctor_get(x_5, 1);
lean_inc(x_41);
x_42 = lean_ctor_get(x_5, 2);
lean_inc(x_42);
x_43 = lean_ctor_get(x_5, 3);
lean_inc(x_43);
lean_dec_ref(x_5);
x_44 = lean_apply_8(x_9, x_36, x_37, x_38, x_39, x_40, x_41, x_42, x_43);
return x_44;
}
}
}
}
}
}
LEAN_EXPORT lean_object* l___private_Lean_Data_RBMap_0__Lean_RBNode_appendTrees_match__1_splitter___redArg(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8) {
_start:
{
if (lean_obj_tag(x_1) == 0)
{
lean_object* x_9; 
lean_dec(x_8);
lean_dec(x_7);
lean_dec(x_6);
lean_dec(x_5);
lean_dec(x_4);
x_9 = lean_apply_1(x_3, x_2);
return x_9;
}
else
{
lean_dec(x_3);
if (lean_obj_tag(x_2) == 0)
{
lean_object* x_10; 
lean_dec(x_8);
lean_dec(x_7);
lean_dec(x_6);
lean_dec(x_5);
x_10 = lean_apply_2(x_4, x_1, lean_box(0));
return x_10;
}
else
{
uint8_t x_11; 
lean_dec(x_4);
x_11 = lean_ctor_get_uint8(x_2, sizeof(void*)*4);
if (x_11 == 0)
{
uint8_t x_12; 
lean_dec(x_8);
lean_dec(x_6);
x_12 = lean_ctor_get_uint8(x_1, sizeof(void*)*4);
if (x_12 == 0)
{
lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; lean_object* x_21; 
lean_dec(x_7);
x_13 = lean_ctor_get(x_1, 0);
lean_inc(x_13);
x_14 = lean_ctor_get(x_1, 1);
lean_inc(x_14);
x_15 = lean_ctor_get(x_1, 2);
lean_inc(x_15);
x_16 = lean_ctor_get(x_1, 3);
lean_inc(x_16);
lean_dec_ref(x_1);
x_17 = lean_ctor_get(x_2, 0);
lean_inc(x_17);
x_18 = lean_ctor_get(x_2, 1);
lean_inc(x_18);
x_19 = lean_ctor_get(x_2, 2);
lean_inc(x_19);
x_20 = lean_ctor_get(x_2, 3);
lean_inc(x_20);
lean_dec_ref(x_2);
x_21 = lean_apply_8(x_5, x_13, x_14, x_15, x_16, x_17, x_18, x_19, x_20);
return x_21;
}
else
{
lean_object* x_22; lean_object* x_23; lean_object* x_24; lean_object* x_25; lean_object* x_26; 
lean_dec(x_5);
x_22 = lean_ctor_get(x_2, 0);
lean_inc(x_22);
x_23 = lean_ctor_get(x_2, 1);
lean_inc(x_23);
x_24 = lean_ctor_get(x_2, 2);
lean_inc(x_24);
x_25 = lean_ctor_get(x_2, 3);
lean_inc(x_25);
lean_dec_ref(x_2);
x_26 = lean_apply_7(x_7, x_1, x_22, x_23, x_24, x_25, lean_box(0), lean_box(0));
return x_26;
}
}
else
{
uint8_t x_27; 
lean_dec(x_7);
lean_dec(x_5);
x_27 = lean_ctor_get_uint8(x_1, sizeof(void*)*4);
if (x_27 == 0)
{
lean_object* x_28; lean_object* x_29; lean_object* x_30; lean_object* x_31; lean_object* x_32; 
lean_dec(x_6);
x_28 = lean_ctor_get(x_1, 0);
lean_inc(x_28);
x_29 = lean_ctor_get(x_1, 1);
lean_inc(x_29);
x_30 = lean_ctor_get(x_1, 2);
lean_inc(x_30);
x_31 = lean_ctor_get(x_1, 3);
lean_inc(x_31);
lean_dec_ref(x_1);
x_32 = lean_apply_7(x_8, x_28, x_29, x_30, x_31, x_2, lean_box(0), lean_box(0));
return x_32;
}
else
{
lean_object* x_33; lean_object* x_34; lean_object* x_35; lean_object* x_36; lean_object* x_37; lean_object* x_38; lean_object* x_39; lean_object* x_40; lean_object* x_41; 
lean_dec(x_8);
x_33 = lean_ctor_get(x_1, 0);
lean_inc(x_33);
x_34 = lean_ctor_get(x_1, 1);
lean_inc(x_34);
x_35 = lean_ctor_get(x_1, 2);
lean_inc(x_35);
x_36 = lean_ctor_get(x_1, 3);
lean_inc(x_36);
lean_dec_ref(x_1);
x_37 = lean_ctor_get(x_2, 0);
lean_inc(x_37);
x_38 = lean_ctor_get(x_2, 1);
lean_inc(x_38);
x_39 = lean_ctor_get(x_2, 2);
lean_inc(x_39);
x_40 = lean_ctor_get(x_2, 3);
lean_inc(x_40);
lean_dec_ref(x_2);
x_41 = lean_apply_8(x_6, x_33, x_34, x_35, x_36, x_37, x_38, x_39, x_40);
return x_41;
}
}
}
}
}
}
LEAN_EXPORT lean_object* l___private_Lean_Data_RBMap_0__Lean_RBNode_isRed_match__1_splitter(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6) {
_start:
{
if (lean_obj_tag(x_4) == 1)
{
uint8_t x_7; 
x_7 = lean_ctor_get_uint8(x_4, sizeof(void*)*4);
if (x_7 == 0)
{
lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; 
lean_dec(x_6);
x_8 = lean_ctor_get(x_4, 0);
lean_inc(x_8);
x_9 = lean_ctor_get(x_4, 1);
lean_inc(x_9);
x_10 = lean_ctor_get(x_4, 2);
lean_inc(x_10);
x_11 = lean_ctor_get(x_4, 3);
lean_inc(x_11);
lean_dec_ref(x_4);
x_12 = lean_apply_4(x_5, x_8, x_9, x_10, x_11);
return x_12;
}
else
{
lean_object* x_13; 
lean_dec(x_5);
x_13 = lean_apply_2(x_6, x_4, lean_box(0));
return x_13;
}
}
else
{
lean_object* x_14; 
lean_dec(x_5);
x_14 = lean_apply_2(x_6, x_4, lean_box(0));
return x_14;
}
}
}
LEAN_EXPORT lean_object* l___private_Lean_Data_RBMap_0__Lean_RBNode_isRed_match__1_splitter___redArg(lean_object* x_1, lean_object* x_2, lean_object* x_3) {
_start:
{
if (lean_obj_tag(x_1) == 1)
{
uint8_t x_4; 
x_4 = lean_ctor_get_uint8(x_1, sizeof(void*)*4);
if (x_4 == 0)
{
lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; 
lean_dec(x_3);
x_5 = lean_ctor_get(x_1, 0);
lean_inc(x_5);
x_6 = lean_ctor_get(x_1, 1);
lean_inc(x_6);
x_7 = lean_ctor_get(x_1, 2);
lean_inc(x_7);
x_8 = lean_ctor_get(x_1, 3);
lean_inc(x_8);
lean_dec_ref(x_1);
x_9 = lean_apply_4(x_2, x_5, x_6, x_7, x_8);
return x_9;
}
else
{
lean_object* x_10; 
lean_dec(x_2);
x_10 = lean_apply_2(x_3, x_1, lean_box(0));
return x_10;
}
}
else
{
lean_object* x_11; 
lean_dec(x_2);
x_11 = lean_apply_2(x_3, x_1, lean_box(0));
return x_11;
}
}
}
LEAN_EXPORT lean_object* l_Lean_RBNode_del___redArg(lean_object* x_1, lean_object* x_2, lean_object* x_3) {
_start:
{
if (lean_obj_tag(x_3) == 0)
{
lean_dec(x_2);
lean_dec_ref(x_1);
return x_3;
}
else
{
uint8_t x_4; 
x_4 = !lean_is_exclusive(x_3);
if (x_4 == 0)
{
lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; uint8_t x_10; 
x_5 = lean_ctor_get(x_3, 0);
x_6 = lean_ctor_get(x_3, 1);
x_7 = lean_ctor_get(x_3, 2);
x_8 = lean_ctor_get(x_3, 3);
lean_inc_ref(x_1);
lean_inc(x_6);
lean_inc(x_2);
x_9 = lean_apply_2(x_1, x_2, x_6);
x_10 = lean_unbox(x_9);
switch (x_10) {
case 0:
{
uint8_t x_11; 
x_11 = l_Lean_RBNode_isBlack___redArg(x_5);
if (x_11 == 0)
{
uint8_t x_12; lean_object* x_13; 
x_12 = 0;
x_13 = l_Lean_RBNode_del___redArg(x_1, x_2, x_5);
lean_ctor_set(x_3, 0, x_13);
lean_ctor_set_uint8(x_3, sizeof(void*)*4, x_12);
return x_3;
}
else
{
lean_object* x_14; lean_object* x_15; 
lean_free_object(x_3);
x_14 = l_Lean_RBNode_del___redArg(x_1, x_2, x_5);
x_15 = l_Lean_RBNode_balLeft___redArg(x_14, x_6, x_7, x_8);
return x_15;
}
}
case 1:
{
lean_object* x_16; 
lean_free_object(x_3);
lean_dec(x_7);
lean_dec(x_6);
lean_dec(x_2);
lean_dec_ref(x_1);
x_16 = l_Lean_RBNode_appendTrees___redArg(x_5, x_8);
return x_16;
}
default: 
{
uint8_t x_17; 
x_17 = l_Lean_RBNode_isBlack___redArg(x_8);
if (x_17 == 0)
{
uint8_t x_18; lean_object* x_19; 
x_18 = 0;
x_19 = l_Lean_RBNode_del___redArg(x_1, x_2, x_8);
lean_ctor_set(x_3, 3, x_19);
lean_ctor_set_uint8(x_3, sizeof(void*)*4, x_18);
return x_3;
}
else
{
lean_object* x_20; lean_object* x_21; 
lean_free_object(x_3);
x_20 = l_Lean_RBNode_del___redArg(x_1, x_2, x_8);
x_21 = l_Lean_RBNode_balRight___redArg(x_5, x_6, x_7, x_20);
return x_21;
}
}
}
}
else
{
lean_object* x_22; lean_object* x_23; lean_object* x_24; lean_object* x_25; lean_object* x_26; uint8_t x_27; 
x_22 = lean_ctor_get(x_3, 0);
x_23 = lean_ctor_get(x_3, 1);
x_24 = lean_ctor_get(x_3, 2);
x_25 = lean_ctor_get(x_3, 3);
lean_inc(x_25);
lean_inc(x_24);
lean_inc(x_23);
lean_inc(x_22);
lean_dec(x_3);
lean_inc_ref(x_1);
lean_inc(x_23);
lean_inc(x_2);
x_26 = lean_apply_2(x_1, x_2, x_23);
x_27 = lean_unbox(x_26);
switch (x_27) {
case 0:
{
uint8_t x_28; 
x_28 = l_Lean_RBNode_isBlack___redArg(x_22);
if (x_28 == 0)
{
uint8_t x_29; lean_object* x_30; lean_object* x_31; 
x_29 = 0;
x_30 = l_Lean_RBNode_del___redArg(x_1, x_2, x_22);
x_31 = lean_alloc_ctor(1, 4, 1);
lean_ctor_set(x_31, 0, x_30);
lean_ctor_set(x_31, 1, x_23);
lean_ctor_set(x_31, 2, x_24);
lean_ctor_set(x_31, 3, x_25);
lean_ctor_set_uint8(x_31, sizeof(void*)*4, x_29);
return x_31;
}
else
{
lean_object* x_32; lean_object* x_33; 
x_32 = l_Lean_RBNode_del___redArg(x_1, x_2, x_22);
x_33 = l_Lean_RBNode_balLeft___redArg(x_32, x_23, x_24, x_25);
return x_33;
}
}
case 1:
{
lean_object* x_34; 
lean_dec(x_24);
lean_dec(x_23);
lean_dec(x_2);
lean_dec_ref(x_1);
x_34 = l_Lean_RBNode_appendTrees___redArg(x_22, x_25);
return x_34;
}
default: 
{
uint8_t x_35; 
x_35 = l_Lean_RBNode_isBlack___redArg(x_25);
if (x_35 == 0)
{
uint8_t x_36; lean_object* x_37; lean_object* x_38; 
x_36 = 0;
x_37 = l_Lean_RBNode_del___redArg(x_1, x_2, x_25);
x_38 = lean_alloc_ctor(1, 4, 1);
lean_ctor_set(x_38, 0, x_22);
lean_ctor_set(x_38, 1, x_23);
lean_ctor_set(x_38, 2, x_24);
lean_ctor_set(x_38, 3, x_37);
lean_ctor_set_uint8(x_38, sizeof(void*)*4, x_36);
return x_38;
}
else
{
lean_object* x_39; lean_object* x_40; 
x_39 = l_Lean_RBNode_del___redArg(x_1, x_2, x_25);
x_40 = l_Lean_RBNode_balRight___redArg(x_22, x_23, x_24, x_39);
return x_40;
}
}
}
}
}
}
}
LEAN_EXPORT lean_object* l_Lean_RBNode_del(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) {
_start:
{
lean_object* x_6; 
x_6 = l_Lean_RBNode_del___redArg(x_3, x_4, x_5);
return x_6;
}
}
LEAN_EXPORT lean_object* l_Lean_RBNode_erase___redArg(lean_object* x_1, lean_object* x_2, lean_object* x_3) {
_start:
{
lean_object* x_4; lean_object* x_5; 
x_4 = l_Lean_RBNode_del___redArg(x_1, x_2, x_3);
x_5 = l_Lean_RBNode_setBlack___redArg(x_4);
return x_5;
}
}
LEAN_EXPORT lean_object* l_Lean_RBNode_erase(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) {
_start:
{
lean_object* x_6; 
x_6 = l_Lean_RBNode_erase___redArg(x_3, x_4, x_5);
return x_6;
}
}
LEAN_EXPORT lean_object* l_Lean_RBNode_findCore___redArg(lean_object* x_1, lean_object* x_2, lean_object* x_3) {
_start:
{
if (lean_obj_tag(x_2) == 0)
{
lean_object* x_4; 
lean_dec(x_3);
lean_dec_ref(x_1);
x_4 = lean_box(0);
return x_4;
}
else
{
lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; uint8_t x_10; 
x_5 = lean_ctor_get(x_2, 0);
lean_inc(x_5);
x_6 = lean_ctor_get(x_2, 1);
lean_inc(x_6);
x_7 = lean_ctor_get(x_2, 2);
lean_inc(x_7);
x_8 = lean_ctor_get(x_2, 3);
lean_inc(x_8);
lean_dec_ref(x_2);
lean_inc_ref(x_1);
lean_inc(x_6);
lean_inc(x_3);
x_9 = lean_apply_2(x_1, x_3, x_6);
x_10 = lean_unbox(x_9);
switch (x_10) {
case 0:
{
lean_dec(x_8);
lean_dec(x_7);
lean_dec(x_6);
x_2 = x_5;
goto _start;
}
case 1:
{
lean_object* x_12; lean_object* x_13; 
lean_dec(x_8);
lean_dec(x_5);
lean_dec(x_3);
lean_dec_ref(x_1);
x_12 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_12, 0, x_6);
lean_ctor_set(x_12, 1, x_7);
x_13 = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(x_13, 0, x_12);
return x_13;
}
default: 
{
lean_dec(x_7);
lean_dec(x_6);
lean_dec(x_5);
x_2 = x_8;
goto _start;
}
}
}
}
}
LEAN_EXPORT lean_object* l_Lean_RBNode_findCore(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) {
_start:
{
lean_object* x_6; 
x_6 = l_Lean_RBNode_findCore___redArg(x_3, x_4, x_5);
return x_6;
}
}
LEAN_EXPORT lean_object* l_Lean_RBNode_find___redArg(lean_object* x_1, lean_object* x_2, lean_object* x_3) {
_start:
{
if (lean_obj_tag(x_2) == 0)
{
lean_object* x_4; 
lean_dec(x_3);
lean_dec_ref(x_1);
x_4 = lean_box(0);
return x_4;
}
else
{
lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; uint8_t x_10; 
x_5 = lean_ctor_get(x_2, 0);
lean_inc(x_5);
x_6 = lean_ctor_get(x_2, 1);
lean_inc(x_6);
x_7 = lean_ctor_get(x_2, 2);
lean_inc(x_7);
x_8 = lean_ctor_get(x_2, 3);
lean_inc(x_8);
lean_dec_ref(x_2);
lean_inc_ref(x_1);
lean_inc(x_3);
x_9 = lean_apply_2(x_1, x_3, x_6);
x_10 = lean_unbox(x_9);
switch (x_10) {
case 0:
{
lean_dec(x_8);
lean_dec(x_7);
x_2 = x_5;
goto _start;
}
case 1:
{
lean_object* x_12; 
lean_dec(x_8);
lean_dec(x_5);
lean_dec(x_3);
lean_dec_ref(x_1);
x_12 = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(x_12, 0, x_7);
return x_12;
}
default: 
{
lean_dec(x_7);
lean_dec(x_5);
x_2 = x_8;
goto _start;
}
}
}
}
}
LEAN_EXPORT lean_object* l_Lean_RBNode_find(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) {
_start:
{
lean_object* x_6; 
x_6 = l_Lean_RBNode_find___redArg(x_2, x_4, x_5);
return x_6;
}
}
LEAN_EXPORT lean_object* l_Lean_RBNode_lowerBound___redArg(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) {
_start:
{
if (lean_obj_tag(x_2) == 0)
{
lean_dec(x_3);
lean_dec_ref(x_1);
return x_4;
}
else
{
lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; uint8_t x_10; 
x_5 = lean_ctor_get(x_2, 0);
lean_inc(x_5);
x_6 = lean_ctor_get(x_2, 1);
lean_inc(x_6);
x_7 = lean_ctor_get(x_2, 2);
lean_inc(x_7);
x_8 = lean_ctor_get(x_2, 3);
lean_inc(x_8);
lean_dec_ref(x_2);
lean_inc_ref(x_1);
lean_inc(x_6);
lean_inc(x_3);
x_9 = lean_apply_2(x_1, x_3, x_6);
x_10 = lean_unbox(x_9);
switch (x_10) {
case 0:
{
lean_dec(x_8);
lean_dec(x_7);
lean_dec(x_6);
x_2 = x_5;
goto _start;
}
case 1:
{
lean_object* x_12; lean_object* x_13; 
lean_dec(x_8);
lean_dec(x_5);
lean_dec(x_4);
lean_dec(x_3);
lean_dec_ref(x_1);
x_12 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_12, 0, x_6);
lean_ctor_set(x_12, 1, x_7);
x_13 = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(x_13, 0, x_12);
return x_13;
}
default: 
{
lean_object* x_14; lean_object* x_15; 
lean_dec(x_5);
lean_dec(x_4);
x_14 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_14, 0, x_6);
lean_ctor_set(x_14, 1, x_7);
x_15 = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(x_15, 0, x_14);
x_2 = x_8;
x_4 = x_15;
goto _start;
}
}
}
}
}
LEAN_EXPORT lean_object* l_Lean_RBNode_lowerBound(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6) {
_start:
{
lean_object* x_7; 
x_7 = l_Lean_RBNode_lowerBound___redArg(x_3, x_4, x_5, x_6);
return x_7;
}
}
LEAN_EXPORT lean_object* l_Lean_RBNode_mapM___redArg___lam__0(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) {
_start:
{
lean_object* x_5; 
x_5 = l_Lean_RBNode_mapM___redArg(x_1, x_2, x_3);
return x_5;
}
}
LEAN_EXPORT lean_object* l_Lean_RBNode_mapM___redArg___lam__1(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) {
_start:
{
lean_object* x_5; 
x_5 = lean_apply_2(x_1, x_2, x_3);
return x_5;
}
}
LEAN_EXPORT lean_object* l_Lean_RBNode_mapM___redArg___lam__2(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) {
_start:
{
lean_object* x_5; 
x_5 = l_Lean_RBNode_mapM___redArg(x_1, x_2, x_3);
return x_5;
}
}
LEAN_EXPORT lean_object* l_Lean_RBNode_mapM___redArg___lam__3(uint8_t x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) {
_start:
{
lean_object* x_6; 
x_6 = lean_alloc_ctor(1, 4, 1);
lean_ctor_set(x_6, 0, x_3);
lean_ctor_set(x_6, 1, x_2);
lean_ctor_set(x_6, 2, x_4);
lean_ctor_set(x_6, 3, x_5);
lean_ctor_set_uint8(x_6, sizeof(void*)*4, x_1);
return x_6;
}
}
LEAN_EXPORT lean_object* l_Lean_RBNode_mapM___redArg___lam__3___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) {
_start:
{
uint8_t x_6; lean_object* x_7; 
x_6 = lean_unbox(x_1);
x_7 = l_Lean_RBNode_mapM___redArg___lam__3(x_6, x_2, x_3, x_4, x_5);
return x_7;
}
}
LEAN_EXPORT lean_object* l_Lean_RBNode_mapM___redArg(lean_object* x_1, lean_object* x_2, lean_object* x_3) {
_start:
{
if (lean_obj_tag(x_3) == 0)
{
lean_object* x_4; lean_object* x_5; lean_object* x_6; 
lean_dec(x_2);
x_4 = lean_ctor_get(x_1, 1);
lean_inc(x_4);
lean_dec_ref(x_1);
x_5 = lean_box(0);
x_6 = lean_apply_2(x_4, lean_box(0), x_5);
return x_6;
}
else
{
lean_object* x_7; lean_object* x_8; uint8_t x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; lean_object* x_21; lean_object* x_22; 
x_7 = lean_ctor_get(x_1, 1);
lean_inc(x_7);
x_8 = lean_ctor_get(x_1, 2);
lean_inc(x_8);
x_9 = lean_ctor_get_uint8(x_3, sizeof(void*)*4);
x_10 = lean_ctor_get(x_3, 0);
lean_inc(x_10);
x_11 = lean_ctor_get(x_3, 1);
lean_inc(x_11);
x_12 = lean_ctor_get(x_3, 2);
lean_inc(x_12);
x_13 = lean_ctor_get(x_3, 3);
lean_inc(x_13);
lean_dec_ref(x_3);
lean_inc(x_2);
lean_inc_ref(x_1);
x_14 = lean_alloc_closure((void*)(l_Lean_RBNode_mapM___redArg___lam__0), 4, 3);
lean_closure_set(x_14, 0, x_1);
lean_closure_set(x_14, 1, x_2);
lean_closure_set(x_14, 2, x_13);
lean_inc(x_11);
lean_inc(x_2);
x_15 = lean_alloc_closure((void*)(l_Lean_RBNode_mapM___redArg___lam__1), 4, 3);
lean_closure_set(x_15, 0, x_2);
lean_closure_set(x_15, 1, x_11);
lean_closure_set(x_15, 2, x_12);
x_16 = lean_alloc_closure((void*)(l_Lean_RBNode_mapM___redArg___lam__2), 4, 3);
lean_closure_set(x_16, 0, x_1);
lean_closure_set(x_16, 1, x_2);
lean_closure_set(x_16, 2, x_10);
x_17 = lean_box(x_9);
x_18 = lean_alloc_closure((void*)(l_Lean_RBNode_mapM___redArg___lam__3___boxed), 5, 2);
lean_closure_set(x_18, 0, x_17);
lean_closure_set(x_18, 1, x_11);
x_19 = lean_apply_2(x_7, lean_box(0), x_18);
lean_inc(x_8);
x_20 = lean_apply_4(x_8, lean_box(0), lean_box(0), x_19, x_16);
lean_inc(x_8);
x_21 = lean_apply_4(x_8, lean_box(0), lean_box(0), x_20, x_15);
x_22 = lean_apply_4(x_8, lean_box(0), lean_box(0), x_21, x_14);
return x_22;
}
}
}
LEAN_EXPORT lean_object* l_Lean_RBNode_mapM(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7) {
_start:
{
lean_object* x_8; 
x_8 = l_Lean_RBNode_mapM___redArg(x_5, x_6, x_7);
return x_8;
}
}
LEAN_EXPORT lean_object* l_Lean_RBNode_map___redArg(lean_object* x_1, lean_object* x_2) {
_start:
{
if (lean_obj_tag(x_2) == 0)
{
lean_object* x_3; 
lean_dec(x_1);
x_3 = lean_box(0);
return x_3;
}
else
{
uint8_t x_4; 
x_4 = !lean_is_exclusive(x_2);
if (x_4 == 0)
{
lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; 
x_5 = lean_ctor_get(x_2, 0);
x_6 = lean_ctor_get(x_2, 1);
x_7 = lean_ctor_get(x_2, 2);
x_8 = lean_ctor_get(x_2, 3);
lean_inc(x_1);
x_9 = l_Lean_RBNode_map___redArg(x_1, x_5);
lean_inc(x_1);
lean_inc(x_6);
x_10 = lean_apply_2(x_1, x_6, x_7);
x_11 = l_Lean_RBNode_map___redArg(x_1, x_8);
lean_ctor_set(x_2, 3, x_11);
lean_ctor_set(x_2, 2, x_10);
lean_ctor_set(x_2, 0, x_9);
return x_2;
}
else
{
uint8_t x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; 
x_12 = lean_ctor_get_uint8(x_2, sizeof(void*)*4);
x_13 = lean_ctor_get(x_2, 0);
x_14 = lean_ctor_get(x_2, 1);
x_15 = lean_ctor_get(x_2, 2);
x_16 = lean_ctor_get(x_2, 3);
lean_inc(x_16);
lean_inc(x_15);
lean_inc(x_14);
lean_inc(x_13);
lean_dec(x_2);
lean_inc(x_1);
x_17 = l_Lean_RBNode_map___redArg(x_1, x_13);
lean_inc(x_1);
lean_inc(x_14);
x_18 = lean_apply_2(x_1, x_14, x_15);
x_19 = l_Lean_RBNode_map___redArg(x_1, x_16);
x_20 = lean_alloc_ctor(1, 4, 1);
lean_ctor_set(x_20, 0, x_17);
lean_ctor_set(x_20, 1, x_14);
lean_ctor_set(x_20, 2, x_18);
lean_ctor_set(x_20, 3, x_19);
lean_ctor_set_uint8(x_20, sizeof(void*)*4, x_12);
return x_20;
}
}
}
}
LEAN_EXPORT lean_object* l_Lean_RBNode_map(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) {
_start:
{
lean_object* x_6; 
x_6 = l_Lean_RBNode_map___redArg(x_4, x_5);
return x_6;
}
}
LEAN_EXPORT lean_object* l_Lean_RBNode_fold___at___00Lean_RBNode_toArray_spec__0___redArg(lean_object* x_1, lean_object* x_2) {
_start:
{
if (lean_obj_tag(x_2) == 0)
{
return x_1;
}
else
{
lean_object* x_3; lean_object* x_4; lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; 
x_3 = lean_ctor_get(x_2, 0);
x_4 = lean_ctor_get(x_2, 1);
x_5 = lean_ctor_get(x_2, 2);
x_6 = lean_ctor_get(x_2, 3);
x_7 = l_Lean_RBNode_fold___at___00Lean_RBNode_toArray_spec__0___redArg(x_1, x_3);
lean_inc(x_5);
lean_inc(x_4);
x_8 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_8, 0, x_4);
lean_ctor_set(x_8, 1, x_5);
x_9 = lean_array_push(x_7, x_8);
x_1 = x_9;
x_2 = x_6;
goto _start;
}
}
}
LEAN_EXPORT lean_object* l_Lean_RBNode_fold___at___00Lean_RBNode_toArray_spec__0(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) {
_start:
{
lean_object* x_5; 
x_5 = l_Lean_RBNode_fold___at___00Lean_RBNode_toArray_spec__0___redArg(x_3, x_4);
return x_5;
}
}
static lean_object* _init_l_Lean_RBNode_toArray___redArg___closed__0() {
_start:
{
lean_object* x_1; 
x_1 = l_Array_empty(lean_box(0));
return x_1;
}
}
LEAN_EXPORT lean_object* l_Lean_RBNode_toArray___redArg(lean_object* x_1) {
_start:
{
lean_object* x_2; lean_object* x_3; 
x_2 = l_Lean_RBNode_toArray___redArg___closed__0;
x_3 = l_Lean_RBNode_fold___at___00Lean_RBNode_toArray_spec__0___redArg(x_2, x_1);
return x_3;
}
}
LEAN_EXPORT lean_object* l_Lean_RBNode_toArray(lean_object* x_1, lean_object* x_2, lean_object* x_3) {
_start:
{
lean_object* x_4; 
x_4 = l_Lean_RBNode_toArray___redArg(x_3);
return x_4;
}
}
LEAN_EXPORT lean_object* l_Lean_RBNode_fold___at___00Lean_RBNode_toArray_spec__0___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) {
_start:
{
lean_object* x_5; 
x_5 = l_Lean_RBNode_fold___at___00Lean_RBNode_toArray_spec__0(x_1, x_2, x_3, x_4);
lean_dec(x_4);
return x_5;
}
}
LEAN_EXPORT lean_object* l_Lean_RBNode_toArray___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) {
_start:
{
lean_object* x_4; 
x_4 = l_Lean_RBNode_toArray(x_1, x_2, x_3);
lean_dec(x_3);
return x_4;
}
}
LEAN_EXPORT lean_object* l_Lean_RBNode_toArray___redArg___boxed(lean_object* x_1) {
_start:
{
lean_object* x_2; 
x_2 = l_Lean_RBNode_toArray___redArg(x_1);
lean_dec(x_1);
return x_2;
}
}
LEAN_EXPORT lean_object* l_Lean_RBNode_fold___at___00Lean_RBNode_toArray_spec__0___redArg___boxed(lean_object* x_1, lean_object* x_2) {
_start:
{
lean_object* x_3; 
x_3 = l_Lean_RBNode_fold___at___00Lean_RBNode_toArray_spec__0___redArg(x_1, x_2);
lean_dec(x_2);
return x_3;
}
}
LEAN_EXPORT lean_object* l_Lean_RBNode_instEmptyCollection(lean_object* x_1, lean_object* x_2) {
_start:
{
lean_object* x_3; 
x_3 = lean_box(0);
return x_3;
}
}
LEAN_EXPORT lean_object* l_Lean_mkRBMap(lean_object* x_1, lean_object* x_2, lean_object* x_3) {
_start:
{
lean_object* x_4; 
x_4 = lean_box(0);
return x_4;
}
}
LEAN_EXPORT lean_object* l_Lean_mkRBMap___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) {
_start:
{
lean_object* x_4; 
x_4 = l_Lean_mkRBMap(x_1, x_2, x_3);
lean_dec_ref(x_3);
return x_4;
}
}
LEAN_EXPORT lean_object* l_Lean_RBMap_empty(lean_object* x_1, lean_object* x_2, lean_object* x_3) {
_start:
{
lean_object* x_4; 
x_4 = lean_box(0);
return x_4;
}
}
LEAN_EXPORT lean_object* l_Lean_RBMap_empty___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) {
_start:
{
lean_object* x_4; 
x_4 = l_Lean_RBMap_empty(x_1, x_2, x_3);
lean_dec_ref(x_3);
return x_4;
}
}
LEAN_EXPORT lean_object* l_Lean_instEmptyCollectionRBMap(lean_object* x_1, lean_object* x_2, lean_object* x_3) {
_start:
{
lean_object* x_4; 
x_4 = lean_box(0);
return x_4;
}
}
LEAN_EXPORT lean_object* l_Lean_instEmptyCollectionRBMap___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) {
_start:
{
lean_object* x_4; 
x_4 = l_Lean_instEmptyCollectionRBMap(x_1, x_2, x_3);
lean_dec_ref(x_3);
return x_4;
}
}
LEAN_EXPORT lean_object* l_Lean_instInhabitedRBMap(lean_object* x_1, lean_object* x_2, lean_object* x_3) {
_start:
{
lean_object* x_4; 
x_4 = lean_box(0);
return x_4;
}
}
LEAN_EXPORT lean_object* l_Lean_instInhabitedRBMap___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) {
_start:
{
lean_object* x_4; 
x_4 = l_Lean_instInhabitedRBMap(x_1, x_2, x_3);
lean_dec_ref(x_3);
return x_4;
}
}
LEAN_EXPORT lean_object* l_Lean_RBMap_depth(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) {
_start:
{
lean_object* x_6; 
x_6 = l_Lean_RBNode_depth___redArg(x_4, x_5);
return x_6;
}
}
LEAN_EXPORT lean_object* l_Lean_RBMap_depth___redArg(lean_object* x_1, lean_object* x_2) {
_start:
{
lean_object* x_3; 
x_3 = l_Lean_RBNode_depth___redArg(x_1, x_2);
return x_3;
}
}
LEAN_EXPORT lean_object* l_Lean_RBMap_depth___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) {
_start:
{
lean_object* x_6; 
x_6 = l_Lean_RBMap_depth(x_1, x_2, x_3, x_4, x_5);
lean_dec(x_5);
lean_dec_ref(x_3);
return x_6;
}
}
LEAN_EXPORT lean_object* l_Lean_RBMap_depth___redArg___boxed(lean_object* x_1, lean_object* x_2) {
_start:
{
lean_object* x_3; 
x_3 = l_Lean_RBMap_depth___redArg(x_1, x_2);
lean_dec(x_2);
return x_3;
}
}
LEAN_EXPORT uint8_t l_Lean_RBMap_isSingleton(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) {
_start:
{
uint8_t x_5; 
x_5 = l_Lean_RBNode_isSingleton___redArg(x_4);
return x_5;
}
}
LEAN_EXPORT uint8_t l_Lean_RBMap_isSingleton___redArg(lean_object* x_1) {
_start:
{
uint8_t x_2; 
x_2 = l_Lean_RBNode_isSingleton___redArg(x_1);
return x_2;
}
}
LEAN_EXPORT lean_object* l_Lean_RBMap_isSingleton___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) {
_start:
{
uint8_t x_5; lean_object* x_6; 
x_5 = l_Lean_RBMap_isSingleton(x_1, x_2, x_3, x_4);
lean_dec(x_4);
lean_dec_ref(x_3);
x_6 = lean_box(x_5);
return x_6;
}
}
LEAN_EXPORT lean_object* l_Lean_RBMap_isSingleton___redArg___boxed(lean_object* x_1) {
_start:
{
uint8_t x_2; lean_object* x_3; 
x_2 = l_Lean_RBMap_isSingleton___redArg(x_1);
lean_dec(x_1);
x_3 = lean_box(x_2);
return x_3;
}
}
LEAN_EXPORT lean_object* l_Lean_RBMap_fold(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7) {
_start:
{
lean_object* x_8; 
x_8 = l_Lean_RBNode_fold___redArg(x_5, x_6, x_7);
return x_8;
}
}
LEAN_EXPORT lean_object* l_Lean_RBMap_fold___redArg(lean_object* x_1, lean_object* x_2, lean_object* x_3) {
_start:
{
lean_object* x_4; 
x_4 = l_Lean_RBNode_fold___redArg(x_1, x_2, x_3);
return x_4;
}
}
LEAN_EXPORT lean_object* l_Lean_RBMap_fold___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7) {
_start:
{
lean_object* x_8; 
x_8 = l_Lean_RBMap_fold(x_1, x_2, x_3, x_4, x_5, x_6, x_7);
lean_dec_ref(x_4);
return x_8;
}
}
LEAN_EXPORT lean_object* l_Lean_RBMap_revFold(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7) {
_start:
{
lean_object* x_8; 
x_8 = l_Lean_RBNode_revFold___redArg(x_5, x_6, x_7);
return x_8;
}
}
LEAN_EXPORT lean_object* l_Lean_RBMap_revFold___redArg(lean_object* x_1, lean_object* x_2, lean_object* x_3) {
_start:
{
lean_object* x_4; 
x_4 = l_Lean_RBNode_revFold___redArg(x_1, x_2, x_3);
return x_4;
}
}
LEAN_EXPORT lean_object* l_Lean_RBMap_revFold___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7) {
_start:
{
lean_object* x_8; 
x_8 = l_Lean_RBMap_revFold(x_1, x_2, x_3, x_4, x_5, x_6, x_7);
lean_dec_ref(x_4);
return x_8;
}
}
LEAN_EXPORT lean_object* l_Lean_RBMap_foldM(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9) {
_start:
{
lean_object* x_10; 
x_10 = l_Lean_RBNode_foldM___redArg(x_6, x_7, x_8, x_9);
return x_10;
}
}
LEAN_EXPORT lean_object* l_Lean_RBMap_foldM___redArg(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) {
_start:
{
lean_object* x_5; 
x_5 = l_Lean_RBNode_foldM___redArg(x_1, x_2, x_3, x_4);
return x_5;
}
}
LEAN_EXPORT lean_object* l_Lean_RBMap_foldM___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9) {
_start:
{
lean_object* x_10; 
x_10 = l_Lean_RBMap_foldM(x_1, x_2, x_3, x_4, x_5, x_6, x_7, x_8, x_9);
lean_dec_ref(x_4);
return x_10;
}
}
LEAN_EXPORT lean_object* l_Lean_RBMap_forM___lam__0(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) {
_start:
{
lean_object* x_5; 
x_5 = lean_apply_2(x_1, x_3, x_4);
return x_5;
}
}
LEAN_EXPORT lean_object* l_Lean_RBMap_forM(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7) {
_start:
{
lean_object* x_8; lean_object* x_9; lean_object* x_10; 
x_8 = lean_alloc_closure((void*)(l_Lean_RBMap_forM___lam__0), 4, 1);
lean_closure_set(x_8, 0, x_6);
x_9 = lean_box(0);
x_10 = l_Lean_RBNode_foldM___redArg(x_5, x_8, x_9, x_7);
return x_10;
}
}
LEAN_EXPORT lean_object* l_Lean_RBMap_forM___redArg(lean_object* x_1, lean_object* x_2, lean_object* x_3) {
_start:
{
lean_object* x_4; lean_object* x_5; lean_object* x_6; 
x_4 = lean_alloc_closure((void*)(l_Lean_RBMap_forM___lam__0), 4, 1);
lean_closure_set(x_4, 0, x_2);
x_5 = lean_box(0);
x_6 = l_Lean_RBNode_foldM___redArg(x_1, x_4, x_5, x_3);
return x_6;
}
}
LEAN_EXPORT lean_object* l_Lean_RBMap_forM___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7) {
_start:
{
lean_object* x_8; 
x_8 = l_Lean_RBMap_forM(x_1, x_2, x_3, x_4, x_5, x_6, x_7);
lean_dec_ref(x_3);
return x_8;
}
}
LEAN_EXPORT lean_object* l_Lean_RBMap_forIn___lam__0(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) {
_start:
{
lean_object* x_5; lean_object* x_6; 
x_5 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_5, 0, x_2);
lean_ctor_set(x_5, 1, x_3);
x_6 = lean_apply_2(x_1, x_5, x_4);
return x_6;
}
}
LEAN_EXPORT lean_object* l_Lean_RBMap_forIn(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9) {
_start:
{
lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; 
x_10 = lean_ctor_get(x_6, 0);
x_11 = lean_ctor_get(x_6, 1);
lean_inc(x_11);
x_12 = lean_ctor_get(x_10, 1);
lean_inc(x_12);
x_13 = lean_alloc_closure((void*)(l_Lean_RBMap_forIn___lam__0), 4, 1);
lean_closure_set(x_13, 0, x_9);
x_14 = l___private_Lean_Data_RBMap_0__Lean_RBNode_forIn_visit___redArg(x_6, x_13, x_7, x_8);
x_15 = lean_alloc_closure((void*)(l_Lean_RBNode_forIn___lam__0), 2, 1);
lean_closure_set(x_15, 0, x_12);
x_16 = lean_apply_4(x_11, lean_box(0), lean_box(0), x_14, x_15);
return x_16;
}
}
LEAN_EXPORT lean_object* l_Lean_RBMap_forIn___redArg(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) {
_start:
{
lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; 
x_5 = lean_ctor_get(x_1, 0);
x_6 = lean_ctor_get(x_1, 1);
lean_inc(x_6);
x_7 = lean_ctor_get(x_5, 1);
lean_inc(x_7);
x_8 = lean_alloc_closure((void*)(l_Lean_RBMap_forIn___lam__0), 4, 1);
lean_closure_set(x_8, 0, x_4);
x_9 = l___private_Lean_Data_RBMap_0__Lean_RBNode_forIn_visit___redArg(x_1, x_8, x_2, x_3);
x_10 = lean_alloc_closure((void*)(l_Lean_RBNode_forIn___lam__0), 2, 1);
lean_closure_set(x_10, 0, x_7);
x_11 = lean_apply_4(x_6, lean_box(0), lean_box(0), x_9, x_10);
return x_11;
}
}
LEAN_EXPORT lean_object* l_Lean_RBMap_forIn___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9) {
_start:
{
lean_object* x_10; 
x_10 = l_Lean_RBMap_forIn(x_1, x_2, x_3, x_4, x_5, x_6, x_7, x_8, x_9);
lean_dec_ref(x_4);
return x_10;
}
}
LEAN_EXPORT lean_object* l_Lean_RBMap_instForInProdOfMonad___redArg___lam__0(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) {
_start:
{
lean_object* x_5; lean_object* x_6; 
x_5 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_5, 0, x_2);
lean_ctor_set(x_5, 1, x_3);
x_6 = lean_apply_2(x_1, x_5, x_4);
return x_6;
}
}
LEAN_EXPORT lean_object* l_Lean_RBMap_instForInProdOfMonad___redArg___lam__2(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) {
_start:
{
lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; 
x_6 = lean_ctor_get(x_1, 0);
x_7 = lean_ctor_get(x_1, 1);
lean_inc(x_7);
x_8 = lean_ctor_get(x_6, 1);
lean_inc(x_8);
x_9 = lean_alloc_closure((void*)(l_Lean_RBMap_instForInProdOfMonad___redArg___lam__0), 4, 1);
lean_closure_set(x_9, 0, x_5);
x_10 = l___private_Lean_Data_RBMap_0__Lean_RBNode_forIn_visit___redArg(x_1, x_9, x_3, x_4);
x_11 = lean_alloc_closure((void*)(l_Lean_RBNode_forIn___lam__0), 2, 1);
lean_closure_set(x_11, 0, x_8);
x_12 = lean_apply_4(x_7, lean_box(0), lean_box(0), x_10, x_11);
return x_12;
}
}
LEAN_EXPORT lean_object* l_Lean_RBMap_instForInProdOfMonad___redArg(lean_object* x_1) {
_start:
{
lean_object* x_2; 
x_2 = lean_alloc_closure((void*)(l_Lean_RBMap_instForInProdOfMonad___redArg___lam__2), 5, 1);
lean_closure_set(x_2, 0, x_1);
return x_2;
}
}
LEAN_EXPORT lean_object* l_Lean_RBMap_instForInProdOfMonad(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) {
_start:
{
lean_object* x_6; 
x_6 = l_Lean_RBMap_instForInProdOfMonad___redArg(x_5);
return x_6;
}
}
LEAN_EXPORT lean_object* l_Lean_RBMap_instForInProdOfMonad___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) {
_start:
{
lean_object* x_6; 
x_6 = l_Lean_RBMap_instForInProdOfMonad(x_1, x_2, x_3, x_4, x_5);
lean_dec_ref(x_3);
return x_6;
}
}
LEAN_EXPORT uint8_t l_Lean_RBMap_isEmpty(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) {
_start:
{
if (lean_obj_tag(x_4) == 0)
{
uint8_t x_5; 
x_5 = 1;
return x_5;
}
else
{
uint8_t x_6; 
x_6 = 0;
return x_6;
}
}
}
LEAN_EXPORT uint8_t l_Lean_RBMap_isEmpty___redArg(lean_object* x_1) {
_start:
{
if (lean_obj_tag(x_1) == 0)
{
uint8_t x_2; 
x_2 = 1;
return x_2;
}
else
{
uint8_t x_3; 
x_3 = 0;
return x_3;
}
}
}
LEAN_EXPORT lean_object* l_Lean_RBMap_isEmpty___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) {
_start:
{
uint8_t x_5; lean_object* x_6; 
x_5 = l_Lean_RBMap_isEmpty(x_1, x_2, x_3, x_4);
lean_dec(x_4);
lean_dec_ref(x_3);
x_6 = lean_box(x_5);
return x_6;
}
}
LEAN_EXPORT lean_object* l_Lean_RBMap_isEmpty___redArg___boxed(lean_object* x_1) {
_start:
{
uint8_t x_2; lean_object* x_3; 
x_2 = l_Lean_RBMap_isEmpty___redArg(x_1);
lean_dec(x_1);
x_3 = lean_box(x_2);
return x_3;
}
}
LEAN_EXPORT lean_object* l_Lean_RBMap_toList___redArg___lam__0(lean_object* x_1, lean_object* x_2, lean_object* x_3) {
_start:
{
lean_object* x_4; lean_object* x_5; 
x_4 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_4, 0, x_2);
lean_ctor_set(x_4, 1, x_3);
x_5 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_5, 0, x_4);
lean_ctor_set(x_5, 1, x_1);
return x_5;
}
}
LEAN_EXPORT lean_object* l_Lean_RBMap_toList___redArg(lean_object* x_1) {
_start:
{
lean_object* x_2; lean_object* x_3; lean_object* x_4; 
x_2 = lean_alloc_closure((void*)(l_Lean_RBMap_toList___redArg___lam__0), 3, 0);
x_3 = lean_box(0);
x_4 = l_Lean_RBNode_revFold___redArg(x_2, x_3, x_1);
return x_4;
}
}
LEAN_EXPORT lean_object* l_Lean_RBMap_toList(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) {
_start:
{
lean_object* x_5; 
x_5 = l_Lean_RBMap_toList___redArg(x_4);
return x_5;
}
}
LEAN_EXPORT lean_object* l_Lean_RBMap_toList___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) {
_start:
{
lean_object* x_5; 
x_5 = l_Lean_RBMap_toList(x_1, x_2, x_3, x_4);
lean_dec_ref(x_3);
return x_5;
}
}
LEAN_EXPORT lean_object* l_Lean_RBMap_toArray___redArg___lam__0(lean_object* x_1, lean_object* x_2, lean_object* x_3) {
_start:
{
lean_object* x_4; lean_object* x_5; 
x_4 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_4, 0, x_2);
lean_ctor_set(x_4, 1, x_3);
x_5 = lean_array_push(x_1, x_4);
return x_5;
}
}
static lean_object* _init_l_Lean_RBMap_toArray___redArg___closed__0() {
_start:
{
lean_object* x_1; lean_object* x_2; 
x_1 = lean_unsigned_to_nat(0u);
x_2 = lean_mk_empty_array_with_capacity(x_1);
return x_2;
}
}
LEAN_EXPORT lean_object* l_Lean_RBMap_toArray___redArg(lean_object* x_1) {
_start:
{
lean_object* x_2; lean_object* x_3; lean_object* x_4; 
x_2 = lean_alloc_closure((void*)(l_Lean_RBMap_toArray___redArg___lam__0), 3, 0);
x_3 = l_Lean_RBMap_toArray___redArg___closed__0;
x_4 = l_Lean_RBNode_fold___redArg(x_2, x_3, x_1);
return x_4;
}
}
LEAN_EXPORT lean_object* l_Lean_RBMap_toArray(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) {
_start:
{
lean_object* x_5; 
x_5 = l_Lean_RBMap_toArray___redArg(x_4);
return x_5;
}
}
LEAN_EXPORT lean_object* l_Lean_RBMap_toArray___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) {
_start:
{
lean_object* x_5; 
x_5 = l_Lean_RBMap_toArray(x_1, x_2, x_3, x_4);
lean_dec_ref(x_3);
return x_5;
}
}
LEAN_EXPORT lean_object* l_Lean_RBMap_min(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) {
_start:
{
lean_object* x_5; 
x_5 = l_Lean_RBNode_min___redArg(x_4);
if (lean_obj_tag(x_5) == 0)
{
lean_object* x_6; 
x_6 = lean_box(0);
return x_6;
}
else
{
uint8_t x_7; 
x_7 = !lean_is_exclusive(x_5);
if (x_7 == 0)
{
lean_object* x_8; uint8_t x_9; 
x_8 = lean_ctor_get(x_5, 0);
x_9 = !lean_is_exclusive(x_8);
if (x_9 == 0)
{
return x_5;
}
else
{
lean_object* x_10; lean_object* x_11; lean_object* x_12; 
x_10 = lean_ctor_get(x_8, 0);
x_11 = lean_ctor_get(x_8, 1);
lean_inc(x_11);
lean_inc(x_10);
lean_dec(x_8);
x_12 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_12, 0, x_10);
lean_ctor_set(x_12, 1, x_11);
lean_ctor_set(x_5, 0, x_12);
return x_5;
}
}
else
{
lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; 
x_13 = lean_ctor_get(x_5, 0);
lean_inc(x_13);
lean_dec(x_5);
x_14 = lean_ctor_get(x_13, 0);
lean_inc(x_14);
x_15 = lean_ctor_get(x_13, 1);
lean_inc(x_15);
if (lean_is_exclusive(x_13)) {
 lean_ctor_release(x_13, 0);
 lean_ctor_release(x_13, 1);
 x_16 = x_13;
} else {
 lean_dec_ref(x_13);
 x_16 = lean_box(0);
}
if (lean_is_scalar(x_16)) {
 x_17 = lean_alloc_ctor(0, 2, 0);
} else {
 x_17 = x_16;
}
lean_ctor_set(x_17, 0, x_14);
lean_ctor_set(x_17, 1, x_15);
x_18 = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(x_18, 0, x_17);
return x_18;
}
}
}
}
LEAN_EXPORT lean_object* l_Lean_RBMap_min___redArg(lean_object* x_1) {
_start:
{
lean_object* x_2; 
x_2 = l_Lean_RBNode_min___redArg(x_1);
if (lean_obj_tag(x_2) == 0)
{
lean_object* x_3; 
x_3 = lean_box(0);
return x_3;
}
else
{
uint8_t x_4; 
x_4 = !lean_is_exclusive(x_2);
if (x_4 == 0)
{
lean_object* x_5; uint8_t x_6; 
x_5 = lean_ctor_get(x_2, 0);
x_6 = !lean_is_exclusive(x_5);
if (x_6 == 0)
{
return x_2;
}
else
{
lean_object* x_7; lean_object* x_8; lean_object* x_9; 
x_7 = lean_ctor_get(x_5, 0);
x_8 = lean_ctor_get(x_5, 1);
lean_inc(x_8);
lean_inc(x_7);
lean_dec(x_5);
x_9 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_9, 0, x_7);
lean_ctor_set(x_9, 1, x_8);
lean_ctor_set(x_2, 0, x_9);
return x_2;
}
}
else
{
lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; 
x_10 = lean_ctor_get(x_2, 0);
lean_inc(x_10);
lean_dec(x_2);
x_11 = lean_ctor_get(x_10, 0);
lean_inc(x_11);
x_12 = lean_ctor_get(x_10, 1);
lean_inc(x_12);
if (lean_is_exclusive(x_10)) {
 lean_ctor_release(x_10, 0);
 lean_ctor_release(x_10, 1);
 x_13 = x_10;
} else {
 lean_dec_ref(x_10);
 x_13 = lean_box(0);
}
if (lean_is_scalar(x_13)) {
 x_14 = lean_alloc_ctor(0, 2, 0);
} else {
 x_14 = x_13;
}
lean_ctor_set(x_14, 0, x_11);
lean_ctor_set(x_14, 1, x_12);
x_15 = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(x_15, 0, x_14);
return x_15;
}
}
}
}
LEAN_EXPORT lean_object* l_Lean_RBMap_min___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) {
_start:
{
lean_object* x_5; 
x_5 = l_Lean_RBMap_min(x_1, x_2, x_3, x_4);
lean_dec(x_4);
lean_dec_ref(x_3);
return x_5;
}
}
LEAN_EXPORT lean_object* l_Lean_RBMap_min___redArg___boxed(lean_object* x_1) {
_start:
{
lean_object* x_2; 
x_2 = l_Lean_RBMap_min___redArg(x_1);
lean_dec(x_1);
return x_2;
}
}
LEAN_EXPORT lean_object* l_Lean_RBMap_max(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) {
_start:
{
lean_object* x_5; 
x_5 = l_Lean_RBNode_max___redArg(x_4);
if (lean_obj_tag(x_5) == 0)
{
lean_object* x_6; 
x_6 = lean_box(0);
return x_6;
}
else
{
uint8_t x_7; 
x_7 = !lean_is_exclusive(x_5);
if (x_7 == 0)
{
lean_object* x_8; uint8_t x_9; 
x_8 = lean_ctor_get(x_5, 0);
x_9 = !lean_is_exclusive(x_8);
if (x_9 == 0)
{
return x_5;
}
else
{
lean_object* x_10; lean_object* x_11; lean_object* x_12; 
x_10 = lean_ctor_get(x_8, 0);
x_11 = lean_ctor_get(x_8, 1);
lean_inc(x_11);
lean_inc(x_10);
lean_dec(x_8);
x_12 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_12, 0, x_10);
lean_ctor_set(x_12, 1, x_11);
lean_ctor_set(x_5, 0, x_12);
return x_5;
}
}
else
{
lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; 
x_13 = lean_ctor_get(x_5, 0);
lean_inc(x_13);
lean_dec(x_5);
x_14 = lean_ctor_get(x_13, 0);
lean_inc(x_14);
x_15 = lean_ctor_get(x_13, 1);
lean_inc(x_15);
if (lean_is_exclusive(x_13)) {
 lean_ctor_release(x_13, 0);
 lean_ctor_release(x_13, 1);
 x_16 = x_13;
} else {
 lean_dec_ref(x_13);
 x_16 = lean_box(0);
}
if (lean_is_scalar(x_16)) {
 x_17 = lean_alloc_ctor(0, 2, 0);
} else {
 x_17 = x_16;
}
lean_ctor_set(x_17, 0, x_14);
lean_ctor_set(x_17, 1, x_15);
x_18 = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(x_18, 0, x_17);
return x_18;
}
}
}
}
LEAN_EXPORT lean_object* l_Lean_RBMap_max___redArg(lean_object* x_1) {
_start:
{
lean_object* x_2; 
x_2 = l_Lean_RBNode_max___redArg(x_1);
if (lean_obj_tag(x_2) == 0)
{
lean_object* x_3; 
x_3 = lean_box(0);
return x_3;
}
else
{
uint8_t x_4; 
x_4 = !lean_is_exclusive(x_2);
if (x_4 == 0)
{
lean_object* x_5; uint8_t x_6; 
x_5 = lean_ctor_get(x_2, 0);
x_6 = !lean_is_exclusive(x_5);
if (x_6 == 0)
{
return x_2;
}
else
{
lean_object* x_7; lean_object* x_8; lean_object* x_9; 
x_7 = lean_ctor_get(x_5, 0);
x_8 = lean_ctor_get(x_5, 1);
lean_inc(x_8);
lean_inc(x_7);
lean_dec(x_5);
x_9 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_9, 0, x_7);
lean_ctor_set(x_9, 1, x_8);
lean_ctor_set(x_2, 0, x_9);
return x_2;
}
}
else
{
lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; 
x_10 = lean_ctor_get(x_2, 0);
lean_inc(x_10);
lean_dec(x_2);
x_11 = lean_ctor_get(x_10, 0);
lean_inc(x_11);
x_12 = lean_ctor_get(x_10, 1);
lean_inc(x_12);
if (lean_is_exclusive(x_10)) {
 lean_ctor_release(x_10, 0);
 lean_ctor_release(x_10, 1);
 x_13 = x_10;
} else {
 lean_dec_ref(x_10);
 x_13 = lean_box(0);
}
if (lean_is_scalar(x_13)) {
 x_14 = lean_alloc_ctor(0, 2, 0);
} else {
 x_14 = x_13;
}
lean_ctor_set(x_14, 0, x_11);
lean_ctor_set(x_14, 1, x_12);
x_15 = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(x_15, 0, x_14);
return x_15;
}
}
}
}
LEAN_EXPORT lean_object* l_Lean_RBMap_max___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) {
_start:
{
lean_object* x_5; 
x_5 = l_Lean_RBMap_max(x_1, x_2, x_3, x_4);
lean_dec(x_4);
lean_dec_ref(x_3);
return x_5;
}
}
LEAN_EXPORT lean_object* l_Lean_RBMap_max___redArg___boxed(lean_object* x_1) {
_start:
{
lean_object* x_2; 
x_2 = l_Lean_RBMap_max___redArg(x_1);
lean_dec(x_1);
return x_2;
}
}
static lean_object* _init_l_Lean_RBMap_instRepr___redArg___lam__0___closed__0() {
_start:
{
lean_object* x_1; 
x_1 = lean_mk_string_unchecked("Lean.rbmapOf ", 13, 13);
return x_1;
}
}
static lean_object* _init_l_Lean_RBMap_instRepr___redArg___lam__0___closed__1() {
_start:
{
lean_object* x_1; lean_object* x_2; 
x_1 = l_Lean_RBMap_instRepr___redArg___lam__0___closed__0;
x_2 = lean_alloc_ctor(3, 1, 0);
lean_ctor_set(x_2, 0, x_1);
return x_2;
}
}
LEAN_EXPORT lean_object* l_Lean_RBMap_instRepr___redArg___lam__0(lean_object* x_1, lean_object* x_2, lean_object* x_3) {
_start:
{
lean_object* x_4; lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; 
x_4 = l_Lean_RBMap_instRepr___redArg___lam__0___closed__1;
x_5 = l_Lean_RBMap_toList___redArg(x_2);
x_6 = l_List_repr___redArg(x_1, x_5);
x_7 = lean_alloc_ctor(5, 2, 0);
lean_ctor_set(x_7, 0, x_4);
lean_ctor_set(x_7, 1, x_6);
x_8 = l_Repr_addAppParen(x_7, x_3);
return x_8;
}
}
LEAN_EXPORT lean_object* l_Lean_RBMap_instRepr___redArg___lam__0___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) {
_start:
{
lean_object* x_4; 
x_4 = l_Lean_RBMap_instRepr___redArg___lam__0(x_1, x_2, x_3);
lean_dec(x_3);
return x_4;
}
}
LEAN_EXPORT lean_object* l_Lean_RBMap_instRepr___redArg(lean_object* x_1, lean_object* x_2) {
_start:
{
lean_object* x_3; lean_object* x_4; lean_object* x_5; 
x_3 = l_instReprTupleOfRepr___redArg(x_2);
x_4 = lean_alloc_closure((void*)(l_Prod_repr___boxed), 6, 4);
lean_closure_set(x_4, 0, lean_box(0));
lean_closure_set(x_4, 1, lean_box(0));
lean_closure_set(x_4, 2, x_1);
lean_closure_set(x_4, 3, x_3);
x_5 = lean_alloc_closure((void*)(l_Lean_RBMap_instRepr___redArg___lam__0___boxed), 3, 1);
lean_closure_set(x_5, 0, x_4);
return x_5;
}
}
LEAN_EXPORT lean_object* l_Lean_RBMap_instRepr(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) {
_start:
{
lean_object* x_6; 
x_6 = l_Lean_RBMap_instRepr___redArg(x_4, x_5);
return x_6;
}
}
LEAN_EXPORT lean_object* l_Lean_RBMap_instRepr___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) {
_start:
{
lean_object* x_6; 
x_6 = l_Lean_RBMap_instRepr(x_1, x_2, x_3, x_4, x_5);
lean_dec_ref(x_3);
return x_6;
}
}
LEAN_EXPORT lean_object* l_Lean_RBMap_insert(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6) {
_start:
{
lean_object* x_7; 
x_7 = l_Lean_RBNode_insert___redArg(x_3, x_4, x_5, x_6);
return x_7;
}
}
LEAN_EXPORT lean_object* l_Lean_RBMap_insert___redArg(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) {
_start:
{
lean_object* x_5; 
x_5 = l_Lean_RBNode_insert___redArg(x_1, x_2, x_3, x_4);
return x_5;
}
}
LEAN_EXPORT lean_object* l_Lean_RBMap_erase(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) {
_start:
{
lean_object* x_6; 
x_6 = l_Lean_RBNode_erase___redArg(x_3, x_5, x_4);
return x_6;
}
}
LEAN_EXPORT lean_object* l_Lean_RBMap_erase___redArg(lean_object* x_1, lean_object* x_2, lean_object* x_3) {
_start:
{
lean_object* x_4; 
x_4 = l_Lean_RBNode_erase___redArg(x_1, x_3, x_2);
return x_4;
}
}
LEAN_EXPORT lean_object* l_Lean_RBMap_ofList___redArg(lean_object* x_1, lean_object* x_2) {
_start:
{
if (lean_obj_tag(x_2) == 0)
{
lean_object* x_3; 
lean_dec_ref(x_1);
x_3 = lean_box(0);
return x_3;
}
else
{
lean_object* x_4; lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; 
x_4 = lean_ctor_get(x_2, 0);
lean_inc(x_4);
x_5 = lean_ctor_get(x_2, 1);
lean_inc(x_5);
lean_dec_ref(x_2);
x_6 = lean_ctor_get(x_4, 0);
lean_inc(x_6);
x_7 = lean_ctor_get(x_4, 1);
lean_inc(x_7);
lean_dec(x_4);
lean_inc_ref(x_1);
x_8 = l_Lean_RBMap_ofList___redArg(x_1, x_5);
x_9 = l_Lean_RBNode_insert___redArg(x_1, x_8, x_6, x_7);
return x_9;
}
}
}
LEAN_EXPORT lean_object* l_Lean_RBMap_ofList(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) {
_start:
{
lean_object* x_5; 
x_5 = l_Lean_RBMap_ofList___redArg(x_3, x_4);
return x_5;
}
}
LEAN_EXPORT lean_object* l_Lean_RBMap_findCore_x3f(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) {
_start:
{
lean_object* x_6; 
x_6 = l_Lean_RBNode_findCore___redArg(x_3, x_4, x_5);
return x_6;
}
}
LEAN_EXPORT lean_object* l_Lean_RBMap_findCore_x3f___redArg(lean_object* x_1, lean_object* x_2, lean_object* x_3) {
_start:
{
lean_object* x_4; 
x_4 = l_Lean_RBNode_findCore___redArg(x_1, x_2, x_3);
return x_4;
}
}
LEAN_EXPORT lean_object* l_Lean_RBMap_find_x3f(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) {
_start:
{
lean_object* x_6; 
x_6 = l_Lean_RBNode_find___redArg(x_3, x_4, x_5);
return x_6;
}
}
LEAN_EXPORT lean_object* l_Lean_RBMap_find_x3f___redArg(lean_object* x_1, lean_object* x_2, lean_object* x_3) {
_start:
{
lean_object* x_4; 
x_4 = l_Lean_RBNode_find___redArg(x_1, x_2, x_3);
return x_4;
}
}
LEAN_EXPORT lean_object* l_Lean_RBMap_findD(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6) {
_start:
{
lean_object* x_7; 
x_7 = l_Lean_RBNode_find___redArg(x_3, x_4, x_5);
if (lean_obj_tag(x_7) == 0)
{
lean_inc(x_6);
return x_6;
}
else
{
lean_object* x_8; 
x_8 = lean_ctor_get(x_7, 0);
lean_inc(x_8);
lean_dec_ref(x_7);
return x_8;
}
}
}
LEAN_EXPORT lean_object* l_Lean_RBMap_findD___redArg(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) {
_start:
{
lean_object* x_5; 
x_5 = l_Lean_RBNode_find___redArg(x_1, x_2, x_3);
if (lean_obj_tag(x_5) == 0)
{
lean_inc(x_4);
return x_4;
}
else
{
lean_object* x_6; 
x_6 = lean_ctor_get(x_5, 0);
lean_inc(x_6);
lean_dec_ref(x_5);
return x_6;
}
}
}
LEAN_EXPORT lean_object* l_Lean_RBMap_findD___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6) {
_start:
{
lean_object* x_7; 
x_7 = l_Lean_RBMap_findD(x_1, x_2, x_3, x_4, x_5, x_6);
lean_dec(x_6);
return x_7;
}
}
LEAN_EXPORT lean_object* l_Lean_RBMap_findD___redArg___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) {
_start:
{
lean_object* x_5; 
x_5 = l_Lean_RBMap_findD___redArg(x_1, x_2, x_3, x_4);
lean_dec(x_4);
return x_5;
}
}
LEAN_EXPORT lean_object* l_Lean_RBMap_lowerBound(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) {
_start:
{
lean_object* x_6; lean_object* x_7; 
x_6 = lean_box(0);
x_7 = l_Lean_RBNode_lowerBound___redArg(x_3, x_4, x_5, x_6);
return x_7;
}
}
LEAN_EXPORT lean_object* l_Lean_RBMap_lowerBound___redArg(lean_object* x_1, lean_object* x_2, lean_object* x_3) {
_start:
{
lean_object* x_4; lean_object* x_5; 
x_4 = lean_box(0);
x_5 = l_Lean_RBNode_lowerBound___redArg(x_1, x_2, x_3, x_4);
return x_5;
}
}
LEAN_EXPORT uint8_t l_Lean_RBMap_contains(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) {
_start:
{
lean_object* x_6; 
x_6 = l_Lean_RBNode_find___redArg(x_3, x_4, x_5);
if (lean_obj_tag(x_6) == 0)
{
uint8_t x_7; 
x_7 = 0;
return x_7;
}
else
{
uint8_t x_8; 
lean_dec_ref(x_6);
x_8 = 1;
return x_8;
}
}
}
LEAN_EXPORT uint8_t l_Lean_RBMap_contains___redArg(lean_object* x_1, lean_object* x_2, lean_object* x_3) {
_start:
{
lean_object* x_4; 
x_4 = l_Lean_RBNode_find___redArg(x_1, x_2, x_3);
if (lean_obj_tag(x_4) == 0)
{
uint8_t x_5; 
x_5 = 0;
return x_5;
}
else
{
uint8_t x_6; 
lean_dec_ref(x_4);
x_6 = 1;
return x_6;
}
}
}
LEAN_EXPORT lean_object* l_Lean_RBMap_contains___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) {
_start:
{
uint8_t x_6; lean_object* x_7; 
x_6 = l_Lean_RBMap_contains(x_1, x_2, x_3, x_4, x_5);
x_7 = lean_box(x_6);
return x_7;
}
}
LEAN_EXPORT lean_object* l_Lean_RBMap_contains___redArg___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) {
_start:
{
uint8_t x_4; lean_object* x_5; 
x_4 = l_Lean_RBMap_contains___redArg(x_1, x_2, x_3);
x_5 = lean_box(x_4);
return x_5;
}
}
LEAN_EXPORT lean_object* l_Lean_RBMap_fromList___lam__0(lean_object* x_1, lean_object* x_2, lean_object* x_3) {
_start:
{
lean_object* x_4; lean_object* x_5; lean_object* x_6; 
x_4 = lean_ctor_get(x_3, 0);
lean_inc(x_4);
x_5 = lean_ctor_get(x_3, 1);
lean_inc(x_5);
lean_dec_ref(x_3);
x_6 = l_Lean_RBNode_insert___redArg(x_1, x_2, x_4, x_5);
return x_6;
}
}
LEAN_EXPORT lean_object* l_Lean_RBMap_fromList(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) {
_start:
{
lean_object* x_5; lean_object* x_6; lean_object* x_7; 
x_5 = lean_alloc_closure((void*)(l_Lean_RBMap_fromList___lam__0), 3, 1);
lean_closure_set(x_5, 0, x_4);
x_6 = lean_box(0);
x_7 = l_List_foldl___redArg(x_5, x_6, x_3);
return x_7;
}
}
LEAN_EXPORT lean_object* l_Lean_RBMap_fromList___redArg(lean_object* x_1, lean_object* x_2) {
_start:
{
lean_object* x_3; lean_object* x_4; lean_object* x_5; 
x_3 = lean_alloc_closure((void*)(l_Lean_RBMap_fromList___lam__0), 3, 1);
lean_closure_set(x_3, 0, x_2);
x_4 = lean_box(0);
x_5 = l_List_foldl___redArg(x_3, x_4, x_1);
return x_5;
}
}
LEAN_EXPORT lean_object* l_Lean_RBMap_fromArray___lam__0(lean_object* x_1, lean_object* x_2, lean_object* x_3) {
_start:
{
lean_object* x_4; lean_object* x_5; lean_object* x_6; 
x_4 = lean_ctor_get(x_3, 0);
lean_inc(x_4);
x_5 = lean_ctor_get(x_3, 1);
lean_inc(x_5);
lean_dec_ref(x_3);
x_6 = l_Lean_RBNode_insert___redArg(x_1, x_2, x_4, x_5);
return x_6;
}
}
static lean_object* _init_l_Lean_RBMap_fromArray___closed__0() {
_start:
{
lean_object* x_1; 
x_1 = lean_alloc_closure((void*)(l_Id_instMonad___lam__0), 4, 0);
return x_1;
}
}
static lean_object* _init_l_Lean_RBMap_fromArray___closed__1() {
_start:
{
lean_object* x_1; 
x_1 = lean_alloc_closure((void*)(l_Id_instMonad___lam__1___boxed), 4, 0);
return x_1;
}
}
static lean_object* _init_l_Lean_RBMap_fromArray___closed__2() {
_start:
{
lean_object* x_1; 
x_1 = lean_alloc_closure((void*)(l_Id_instMonad___lam__2___boxed), 2, 0);
return x_1;
}
}
static lean_object* _init_l_Lean_RBMap_fromArray___closed__3() {
_start:
{
lean_object* x_1; 
x_1 = lean_alloc_closure((void*)(l_Id_instMonad___lam__3), 4, 0);
return x_1;
}
}
static lean_object* _init_l_Lean_RBMap_fromArray___closed__4() {
_start:
{
lean_object* x_1; 
x_1 = lean_alloc_closure((void*)(l_Id_instMonad___lam__4___boxed), 4, 0);
return x_1;
}
}
static lean_object* _init_l_Lean_RBMap_fromArray___closed__5() {
_start:
{
lean_object* x_1; 
x_1 = lean_alloc_closure((void*)(l_Id_instMonad___lam__5___boxed), 4, 0);
return x_1;
}
}
static lean_object* _init_l_Lean_RBMap_fromArray___closed__6() {
_start:
{
lean_object* x_1; 
x_1 = lean_alloc_closure((void*)(l_Id_instMonad___lam__6), 4, 0);
return x_1;
}
}
static lean_object* _init_l_Lean_RBMap_fromArray___closed__7() {
_start:
{
lean_object* x_1; lean_object* x_2; lean_object* x_3; 
x_1 = l_Lean_RBMap_fromArray___closed__1;
x_2 = l_Lean_RBMap_fromArray___closed__0;
x_3 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_3, 0, x_2);
lean_ctor_set(x_3, 1, x_1);
return x_3;
}
}
static lean_object* _init_l_Lean_RBMap_fromArray___closed__8() {
_start:
{
lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4; lean_object* x_5; lean_object* x_6; 
x_1 = l_Lean_RBMap_fromArray___closed__5;
x_2 = l_Lean_RBMap_fromArray___closed__4;
x_3 = l_Lean_RBMap_fromArray___closed__3;
x_4 = l_Lean_RBMap_fromArray___closed__2;
x_5 = l_Lean_RBMap_fromArray___closed__7;
x_6 = lean_alloc_ctor(0, 5, 0);
lean_ctor_set(x_6, 0, x_5);
lean_ctor_set(x_6, 1, x_4);
lean_ctor_set(x_6, 2, x_3);
lean_ctor_set(x_6, 3, x_2);
lean_ctor_set(x_6, 4, x_1);
return x_6;
}
}
static lean_object* _init_l_Lean_RBMap_fromArray___closed__9() {
_start:
{
lean_object* x_1; lean_object* x_2; lean_object* x_3; 
x_1 = l_Lean_RBMap_fromArray___closed__6;
x_2 = l_Lean_RBMap_fromArray___closed__8;
x_3 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_3, 0, x_2);
lean_ctor_set(x_3, 1, x_1);
return x_3;
}
}
LEAN_EXPORT lean_object* l_Lean_RBMap_fromArray(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) {
_start:
{
lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; uint8_t x_9; 
x_5 = lean_box(0);
x_6 = lean_unsigned_to_nat(0u);
x_7 = lean_array_get_size(x_3);
x_8 = l_Lean_RBMap_fromArray___closed__9;
x_9 = lean_nat_dec_lt(x_6, x_7);
if (x_9 == 0)
{
lean_dec(x_7);
lean_dec_ref(x_4);
lean_dec_ref(x_3);
return x_5;
}
else
{
uint8_t x_10; 
x_10 = lean_nat_dec_le(x_7, x_7);
if (x_10 == 0)
{
lean_dec(x_7);
lean_dec_ref(x_4);
lean_dec_ref(x_3);
return x_5;
}
else
{
lean_object* x_11; size_t x_12; size_t x_13; lean_object* x_14; 
x_11 = lean_alloc_closure((void*)(l_Lean_RBMap_fromArray___lam__0), 3, 1);
lean_closure_set(x_11, 0, x_4);
x_12 = 0;
x_13 = lean_usize_of_nat(x_7);
lean_dec(x_7);
x_14 = l___private_Init_Data_Array_Basic_0__Array_foldlMUnsafe_fold(lean_box(0), lean_box(0), lean_box(0), x_8, x_11, x_3, x_12, x_13, x_5);
return x_14;
}
}
}
}
LEAN_EXPORT lean_object* l_Lean_RBMap_fromArray___redArg(lean_object* x_1, lean_object* x_2) {
_start:
{
lean_object* x_3; lean_object* x_4; lean_object* x_5; lean_object* x_6; uint8_t x_7; 
x_3 = lean_box(0);
x_4 = lean_unsigned_to_nat(0u);
x_5 = lean_array_get_size(x_1);
x_6 = l_Lean_RBMap_fromArray___closed__9;
x_7 = lean_nat_dec_lt(x_4, x_5);
if (x_7 == 0)
{
lean_dec(x_5);
lean_dec_ref(x_2);
lean_dec_ref(x_1);
return x_3;
}
else
{
uint8_t x_8; 
x_8 = lean_nat_dec_le(x_5, x_5);
if (x_8 == 0)
{
lean_dec(x_5);
lean_dec_ref(x_2);
lean_dec_ref(x_1);
return x_3;
}
else
{
lean_object* x_9; size_t x_10; size_t x_11; lean_object* x_12; 
x_9 = lean_alloc_closure((void*)(l_Lean_RBMap_fromArray___lam__0), 3, 1);
lean_closure_set(x_9, 0, x_2);
x_10 = 0;
x_11 = lean_usize_of_nat(x_5);
lean_dec(x_5);
x_12 = l___private_Init_Data_Array_Basic_0__Array_foldlMUnsafe_fold(lean_box(0), lean_box(0), lean_box(0), x_6, x_9, x_1, x_10, x_11, x_3);
return x_12;
}
}
}
}
LEAN_EXPORT uint8_t l_Lean_RBMap_all(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) {
_start:
{
uint8_t x_6; 
x_6 = l_Lean_RBNode_all___redArg(x_5, x_4);
return x_6;
}
}
LEAN_EXPORT uint8_t l_Lean_RBMap_all___redArg(lean_object* x_1, lean_object* x_2) {
_start:
{
uint8_t x_3; 
x_3 = l_Lean_RBNode_all___redArg(x_2, x_1);
return x_3;
}
}
LEAN_EXPORT lean_object* l_Lean_RBMap_all___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) {
_start:
{
uint8_t x_6; lean_object* x_7; 
x_6 = l_Lean_RBMap_all(x_1, x_2, x_3, x_4, x_5);
lean_dec_ref(x_3);
x_7 = lean_box(x_6);
return x_7;
}
}
LEAN_EXPORT lean_object* l_Lean_RBMap_all___redArg___boxed(lean_object* x_1, lean_object* x_2) {
_start:
{
uint8_t x_3; lean_object* x_4; 
x_3 = l_Lean_RBMap_all___redArg(x_1, x_2);
x_4 = lean_box(x_3);
return x_4;
}
}
LEAN_EXPORT uint8_t l_Lean_RBMap_any(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) {
_start:
{
uint8_t x_6; 
x_6 = l_Lean_RBNode_any___redArg(x_5, x_4);
return x_6;
}
}
LEAN_EXPORT uint8_t l_Lean_RBMap_any___redArg(lean_object* x_1, lean_object* x_2) {
_start:
{
uint8_t x_3; 
x_3 = l_Lean_RBNode_any___redArg(x_2, x_1);
return x_3;
}
}
LEAN_EXPORT lean_object* l_Lean_RBMap_any___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) {
_start:
{
uint8_t x_6; lean_object* x_7; 
x_6 = l_Lean_RBMap_any(x_1, x_2, x_3, x_4, x_5);
lean_dec_ref(x_3);
x_7 = lean_box(x_6);
return x_7;
}
}
LEAN_EXPORT lean_object* l_Lean_RBMap_any___redArg___boxed(lean_object* x_1, lean_object* x_2) {
_start:
{
uint8_t x_3; lean_object* x_4; 
x_3 = l_Lean_RBMap_any___redArg(x_1, x_2);
x_4 = lean_box(x_3);
return x_4;
}
}
LEAN_EXPORT lean_object* l_Lean_RBNode_fold___at___00Lean_RBMap_size_spec__0___redArg(lean_object* x_1, lean_object* x_2) {
_start:
{
if (lean_obj_tag(x_2) == 0)
{
return x_1;
}
else
{
lean_object* x_3; lean_object* x_4; lean_object* x_5; lean_object* x_6; lean_object* x_7; 
x_3 = lean_ctor_get(x_2, 0);
x_4 = lean_ctor_get(x_2, 3);
x_5 = l_Lean_RBNode_fold___at___00Lean_RBMap_size_spec__0___redArg(x_1, x_3);
x_6 = lean_unsigned_to_nat(1u);
x_7 = lean_nat_add(x_5, x_6);
lean_dec(x_5);
x_1 = x_7;
x_2 = x_4;
goto _start;
}
}
}
LEAN_EXPORT lean_object* l_Lean_RBMap_size___redArg(lean_object* x_1) {
_start:
{
lean_object* x_2; lean_object* x_3; 
x_2 = lean_unsigned_to_nat(0u);
x_3 = l_Lean_RBNode_fold___at___00Lean_RBMap_size_spec__0___redArg(x_2, x_1);
return x_3;
}
}
LEAN_EXPORT lean_object* l_Lean_RBMap_size(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) {
_start:
{
lean_object* x_5; 
x_5 = l_Lean_RBMap_size___redArg(x_4);
return x_5;
}
}
LEAN_EXPORT lean_object* l_Lean_RBNode_fold___at___00Lean_RBMap_size_spec__0(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) {
_start:
{
lean_object* x_5; 
x_5 = l_Lean_RBNode_fold___at___00Lean_RBMap_size_spec__0___redArg(x_3, x_4);
return x_5;
}
}
LEAN_EXPORT lean_object* l_Lean_RBMap_size___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) {
_start:
{
lean_object* x_5; 
x_5 = l_Lean_RBMap_size(x_1, x_2, x_3, x_4);
lean_dec(x_4);
lean_dec_ref(x_3);
return x_5;
}
}
LEAN_EXPORT lean_object* l_Lean_RBNode_fold___at___00Lean_RBMap_size_spec__0___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) {
_start:
{
lean_object* x_5; 
x_5 = l_Lean_RBNode_fold___at___00Lean_RBMap_size_spec__0(x_1, x_2, x_3, x_4);
lean_dec(x_4);
return x_5;
}
}
LEAN_EXPORT lean_object* l_Lean_RBMap_size___redArg___boxed(lean_object* x_1) {
_start:
{
lean_object* x_2; 
x_2 = l_Lean_RBMap_size___redArg(x_1);
lean_dec(x_1);
return x_2;
}
}
LEAN_EXPORT lean_object* l_Lean_RBNode_fold___at___00Lean_RBMap_size_spec__0___redArg___boxed(lean_object* x_1, lean_object* x_2) {
_start:
{
lean_object* x_3; 
x_3 = l_Lean_RBNode_fold___at___00Lean_RBMap_size_spec__0___redArg(x_1, x_2);
lean_dec(x_2);
return x_3;
}
}
LEAN_EXPORT lean_object* l_Lean_RBMap_maxDepth___redArg___lam__0(lean_object* x_1, lean_object* x_2) {
_start:
{
uint8_t x_3; 
x_3 = lean_nat_dec_le(x_1, x_2);
if (x_3 == 0)
{
lean_inc(x_1);
return x_1;
}
else
{
lean_inc(x_2);
return x_2;
}
}
}
LEAN_EXPORT lean_object* l_Lean_RBMap_maxDepth___redArg___lam__0___boxed(lean_object* x_1, lean_object* x_2) {
_start:
{
lean_object* x_3; 
x_3 = l_Lean_RBMap_maxDepth___redArg___lam__0(x_1, x_2);
lean_dec(x_2);
lean_dec(x_1);
return x_3;
}
}
LEAN_EXPORT lean_object* l_Lean_RBMap_maxDepth___redArg(lean_object* x_1) {
_start:
{
lean_object* x_2; lean_object* x_3; 
x_2 = lean_alloc_closure((void*)(l_Lean_RBMap_maxDepth___redArg___lam__0___boxed), 2, 0);
x_3 = l_Lean_RBNode_depth___redArg(x_2, x_1);
return x_3;
}
}
LEAN_EXPORT lean_object* l_Lean_RBMap_maxDepth(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) {
_start:
{
lean_object* x_5; 
x_5 = l_Lean_RBMap_maxDepth___redArg(x_4);
return x_5;
}
}
LEAN_EXPORT lean_object* l_Lean_RBMap_maxDepth___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) {
_start:
{
lean_object* x_5; 
x_5 = l_Lean_RBMap_maxDepth(x_1, x_2, x_3, x_4);
lean_dec(x_4);
lean_dec_ref(x_3);
return x_5;
}
}
LEAN_EXPORT lean_object* l_Lean_RBMap_maxDepth___redArg___boxed(lean_object* x_1) {
_start:
{
lean_object* x_2; 
x_2 = l_Lean_RBMap_maxDepth___redArg(x_1);
lean_dec(x_1);
return x_2;
}
}
static lean_object* _init_l_Lean_RBMap_min_x21___closed__0() {
_start:
{
lean_object* x_1; 
x_1 = lean_mk_string_unchecked("Lean.Data.RBMap", 15, 15);
return x_1;
}
}
static lean_object* _init_l_Lean_RBMap_min_x21___closed__1() {
_start:
{
lean_object* x_1; 
x_1 = lean_mk_string_unchecked("Lean.RBMap.min!", 15, 15);
return x_1;
}
}
static lean_object* _init_l_Lean_RBMap_min_x21___closed__2() {
_start:
{
lean_object* x_1; 
x_1 = lean_mk_string_unchecked("map is empty", 12, 12);
return x_1;
}
}
static lean_object* _init_l_Lean_RBMap_min_x21___closed__3() {
_start:
{
lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4; lean_object* x_5; lean_object* x_6; 
x_1 = l_Lean_RBMap_min_x21___closed__2;
x_2 = lean_unsigned_to_nat(14u);
x_3 = lean_unsigned_to_nat(382u);
x_4 = l_Lean_RBMap_min_x21___closed__1;
x_5 = l_Lean_RBMap_min_x21___closed__0;
x_6 = l_mkPanicMessageWithDecl(x_5, x_4, x_3, x_2, x_1);
return x_6;
}
}
LEAN_EXPORT lean_object* l_Lean_RBMap_min_x21(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6) {
_start:
{
lean_object* x_7; 
x_7 = l_Lean_RBNode_min___redArg(x_6);
if (lean_obj_tag(x_7) == 0)
{
lean_object* x_8; lean_object* x_9; lean_object* x_10; 
x_8 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_8, 0, x_4);
lean_ctor_set(x_8, 1, x_5);
x_9 = l_Lean_RBMap_min_x21___closed__3;
x_10 = l_panic___redArg(x_8, x_9);
return x_10;
}
else
{
lean_object* x_11; uint8_t x_12; 
lean_dec(x_5);
lean_dec(x_4);
x_11 = lean_ctor_get(x_7, 0);
lean_inc(x_11);
lean_dec_ref(x_7);
x_12 = !lean_is_exclusive(x_11);
if (x_12 == 0)
{
return x_11;
}
else
{
lean_object* x_13; lean_object* x_14; lean_object* x_15; 
x_13 = lean_ctor_get(x_11, 0);
x_14 = lean_ctor_get(x_11, 1);
lean_inc(x_14);
lean_inc(x_13);
lean_dec(x_11);
x_15 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_15, 0, x_13);
lean_ctor_set(x_15, 1, x_14);
return x_15;
}
}
}
}
LEAN_EXPORT lean_object* l_Lean_RBMap_min_x21___redArg(lean_object* x_1, lean_object* x_2, lean_object* x_3) {
_start:
{
lean_object* x_4; 
x_4 = l_Lean_RBNode_min___redArg(x_3);
if (lean_obj_tag(x_4) == 0)
{
lean_object* x_5; lean_object* x_6; lean_object* x_7; 
x_5 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_5, 0, x_1);
lean_ctor_set(x_5, 1, x_2);
x_6 = l_Lean_RBMap_min_x21___closed__3;
x_7 = l_panic___redArg(x_5, x_6);
return x_7;
}
else
{
lean_object* x_8; uint8_t x_9; 
lean_dec(x_2);
lean_dec(x_1);
x_8 = lean_ctor_get(x_4, 0);
lean_inc(x_8);
lean_dec_ref(x_4);
x_9 = !lean_is_exclusive(x_8);
if (x_9 == 0)
{
return x_8;
}
else
{
lean_object* x_10; lean_object* x_11; lean_object* x_12; 
x_10 = lean_ctor_get(x_8, 0);
x_11 = lean_ctor_get(x_8, 1);
lean_inc(x_11);
lean_inc(x_10);
lean_dec(x_8);
x_12 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_12, 0, x_10);
lean_ctor_set(x_12, 1, x_11);
return x_12;
}
}
}
}
LEAN_EXPORT lean_object* l_Lean_RBMap_min_x21___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6) {
_start:
{
lean_object* x_7; 
x_7 = l_Lean_RBMap_min_x21(x_1, x_2, x_3, x_4, x_5, x_6);
lean_dec(x_6);
lean_dec_ref(x_3);
return x_7;
}
}
LEAN_EXPORT lean_object* l_Lean_RBMap_min_x21___redArg___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) {
_start:
{
lean_object* x_4; 
x_4 = l_Lean_RBMap_min_x21___redArg(x_1, x_2, x_3);
lean_dec(x_3);
return x_4;
}
}
static lean_object* _init_l_Lean_RBMap_max_x21___closed__0() {
_start:
{
lean_object* x_1; 
x_1 = lean_mk_string_unchecked("Lean.RBMap.max!", 15, 15);
return x_1;
}
}
static lean_object* _init_l_Lean_RBMap_max_x21___closed__1() {
_start:
{
lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4; lean_object* x_5; lean_object* x_6; 
x_1 = l_Lean_RBMap_min_x21___closed__2;
x_2 = lean_unsigned_to_nat(14u);
x_3 = lean_unsigned_to_nat(387u);
x_4 = l_Lean_RBMap_max_x21___closed__0;
x_5 = l_Lean_RBMap_min_x21___closed__0;
x_6 = l_mkPanicMessageWithDecl(x_5, x_4, x_3, x_2, x_1);
return x_6;
}
}
LEAN_EXPORT lean_object* l_Lean_RBMap_max_x21(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6) {
_start:
{
lean_object* x_7; 
x_7 = l_Lean_RBNode_max___redArg(x_6);
if (lean_obj_tag(x_7) == 0)
{
lean_object* x_8; lean_object* x_9; lean_object* x_10; 
x_8 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_8, 0, x_4);
lean_ctor_set(x_8, 1, x_5);
x_9 = l_Lean_RBMap_max_x21___closed__1;
x_10 = l_panic___redArg(x_8, x_9);
return x_10;
}
else
{
lean_object* x_11; uint8_t x_12; 
lean_dec(x_5);
lean_dec(x_4);
x_11 = lean_ctor_get(x_7, 0);
lean_inc(x_11);
lean_dec_ref(x_7);
x_12 = !lean_is_exclusive(x_11);
if (x_12 == 0)
{
return x_11;
}
else
{
lean_object* x_13; lean_object* x_14; lean_object* x_15; 
x_13 = lean_ctor_get(x_11, 0);
x_14 = lean_ctor_get(x_11, 1);
lean_inc(x_14);
lean_inc(x_13);
lean_dec(x_11);
x_15 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_15, 0, x_13);
lean_ctor_set(x_15, 1, x_14);
return x_15;
}
}
}
}
LEAN_EXPORT lean_object* l_Lean_RBMap_max_x21___redArg(lean_object* x_1, lean_object* x_2, lean_object* x_3) {
_start:
{
lean_object* x_4; 
x_4 = l_Lean_RBNode_max___redArg(x_3);
if (lean_obj_tag(x_4) == 0)
{
lean_object* x_5; lean_object* x_6; lean_object* x_7; 
x_5 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_5, 0, x_1);
lean_ctor_set(x_5, 1, x_2);
x_6 = l_Lean_RBMap_max_x21___closed__1;
x_7 = l_panic___redArg(x_5, x_6);
return x_7;
}
else
{
lean_object* x_8; uint8_t x_9; 
lean_dec(x_2);
lean_dec(x_1);
x_8 = lean_ctor_get(x_4, 0);
lean_inc(x_8);
lean_dec_ref(x_4);
x_9 = !lean_is_exclusive(x_8);
if (x_9 == 0)
{
return x_8;
}
else
{
lean_object* x_10; lean_object* x_11; lean_object* x_12; 
x_10 = lean_ctor_get(x_8, 0);
x_11 = lean_ctor_get(x_8, 1);
lean_inc(x_11);
lean_inc(x_10);
lean_dec(x_8);
x_12 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_12, 0, x_10);
lean_ctor_set(x_12, 1, x_11);
return x_12;
}
}
}
}
LEAN_EXPORT lean_object* l_Lean_RBMap_max_x21___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6) {
_start:
{
lean_object* x_7; 
x_7 = l_Lean_RBMap_max_x21(x_1, x_2, x_3, x_4, x_5, x_6);
lean_dec(x_6);
lean_dec_ref(x_3);
return x_7;
}
}
LEAN_EXPORT lean_object* l_Lean_RBMap_max_x21___redArg___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) {
_start:
{
lean_object* x_4; 
x_4 = l_Lean_RBMap_max_x21___redArg(x_1, x_2, x_3);
lean_dec(x_3);
return x_4;
}
}
static lean_object* _init_l_Lean_RBMap_find_x21___closed__0() {
_start:
{
lean_object* x_1; 
x_1 = lean_mk_string_unchecked("Lean.RBMap.find!", 16, 16);
return x_1;
}
}
static lean_object* _init_l_Lean_RBMap_find_x21___closed__1() {
_start:
{
lean_object* x_1; 
x_1 = lean_mk_string_unchecked("key is not in the map", 21, 21);
return x_1;
}
}
static lean_object* _init_l_Lean_RBMap_find_x21___closed__2() {
_start:
{
lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4; lean_object* x_5; lean_object* x_6; 
x_1 = l_Lean_RBMap_find_x21___closed__1;
x_2 = lean_unsigned_to_nat(14u);
x_3 = lean_unsigned_to_nat(393u);
x_4 = l_Lean_RBMap_find_x21___closed__0;
x_5 = l_Lean_RBMap_min_x21___closed__0;
x_6 = l_mkPanicMessageWithDecl(x_5, x_4, x_3, x_2, x_1);
return x_6;
}
}
LEAN_EXPORT lean_object* l_Lean_RBMap_find_x21(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6) {
_start:
{
lean_object* x_7; 
x_7 = l_Lean_RBNode_find___redArg(x_3, x_5, x_6);
if (lean_obj_tag(x_7) == 0)
{
lean_object* x_8; lean_object* x_9; 
x_8 = l_Lean_RBMap_find_x21___closed__2;
x_9 = l_panic___redArg(x_4, x_8);
return x_9;
}
else
{
lean_object* x_10; 
lean_dec(x_4);
x_10 = lean_ctor_get(x_7, 0);
lean_inc(x_10);
lean_dec_ref(x_7);
return x_10;
}
}
}
LEAN_EXPORT lean_object* l_Lean_RBMap_find_x21___redArg(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) {
_start:
{
lean_object* x_5; 
x_5 = l_Lean_RBNode_find___redArg(x_1, x_3, x_4);
if (lean_obj_tag(x_5) == 0)
{
lean_object* x_6; lean_object* x_7; 
x_6 = l_Lean_RBMap_find_x21___closed__2;
x_7 = l_panic___redArg(x_2, x_6);
return x_7;
}
else
{
lean_object* x_8; 
lean_dec(x_2);
x_8 = lean_ctor_get(x_5, 0);
lean_inc(x_8);
lean_dec_ref(x_5);
return x_8;
}
}
}
LEAN_EXPORT lean_object* l_Lean_RBNode_ins___at___00Lean_RBNode_insert___at___00Lean_RBMap_mergeBy_spec__0_spec__0___redArg(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) {
_start:
{
if (lean_obj_tag(x_2) == 0)
{
uint8_t x_5; lean_object* x_6; 
lean_dec_ref(x_1);
x_5 = 0;
x_6 = lean_alloc_ctor(1, 4, 1);
lean_ctor_set(x_6, 0, x_2);
lean_ctor_set(x_6, 1, x_3);
lean_ctor_set(x_6, 2, x_4);
lean_ctor_set(x_6, 3, x_2);
lean_ctor_set_uint8(x_6, sizeof(void*)*4, x_5);
return x_6;
}
else
{
uint8_t x_7; 
x_7 = lean_ctor_get_uint8(x_2, sizeof(void*)*4);
if (x_7 == 0)
{
uint8_t x_8; 
x_8 = !lean_is_exclusive(x_2);
if (x_8 == 0)
{
lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; uint8_t x_14; 
x_9 = lean_ctor_get(x_2, 0);
x_10 = lean_ctor_get(x_2, 1);
x_11 = lean_ctor_get(x_2, 2);
x_12 = lean_ctor_get(x_2, 3);
lean_inc_ref(x_1);
lean_inc(x_10);
lean_inc(x_3);
x_13 = lean_apply_2(x_1, x_3, x_10);
x_14 = lean_unbox(x_13);
switch (x_14) {
case 0:
{
lean_object* x_15; 
x_15 = l_Lean_RBNode_ins___at___00Lean_RBNode_insert___at___00Lean_RBMap_mergeBy_spec__0_spec__0___redArg(x_1, x_9, x_3, x_4);
lean_ctor_set(x_2, 0, x_15);
return x_2;
}
case 1:
{
lean_dec(x_11);
lean_dec(x_10);
lean_dec_ref(x_1);
lean_ctor_set(x_2, 2, x_4);
lean_ctor_set(x_2, 1, x_3);
return x_2;
}
default: 
{
lean_object* x_16; 
x_16 = l_Lean_RBNode_ins___at___00Lean_RBNode_insert___at___00Lean_RBMap_mergeBy_spec__0_spec__0___redArg(x_1, x_12, x_3, x_4);
lean_ctor_set(x_2, 3, x_16);
return x_2;
}
}
}
else
{
lean_object* x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; lean_object* x_21; uint8_t x_22; 
x_17 = lean_ctor_get(x_2, 0);
x_18 = lean_ctor_get(x_2, 1);
x_19 = lean_ctor_get(x_2, 2);
x_20 = lean_ctor_get(x_2, 3);
lean_inc(x_20);
lean_inc(x_19);
lean_inc(x_18);
lean_inc(x_17);
lean_dec(x_2);
lean_inc_ref(x_1);
lean_inc(x_18);
lean_inc(x_3);
x_21 = lean_apply_2(x_1, x_3, x_18);
x_22 = lean_unbox(x_21);
switch (x_22) {
case 0:
{
lean_object* x_23; lean_object* x_24; 
x_23 = l_Lean_RBNode_ins___at___00Lean_RBNode_insert___at___00Lean_RBMap_mergeBy_spec__0_spec__0___redArg(x_1, x_17, x_3, x_4);
x_24 = lean_alloc_ctor(1, 4, 1);
lean_ctor_set(x_24, 0, x_23);
lean_ctor_set(x_24, 1, x_18);
lean_ctor_set(x_24, 2, x_19);
lean_ctor_set(x_24, 3, x_20);
lean_ctor_set_uint8(x_24, sizeof(void*)*4, x_7);
return x_24;
}
case 1:
{
lean_object* x_25; 
lean_dec(x_19);
lean_dec(x_18);
lean_dec_ref(x_1);
x_25 = lean_alloc_ctor(1, 4, 1);
lean_ctor_set(x_25, 0, x_17);
lean_ctor_set(x_25, 1, x_3);
lean_ctor_set(x_25, 2, x_4);
lean_ctor_set(x_25, 3, x_20);
lean_ctor_set_uint8(x_25, sizeof(void*)*4, x_7);
return x_25;
}
default: 
{
lean_object* x_26; lean_object* x_27; 
x_26 = l_Lean_RBNode_ins___at___00Lean_RBNode_insert___at___00Lean_RBMap_mergeBy_spec__0_spec__0___redArg(x_1, x_20, x_3, x_4);
x_27 = lean_alloc_ctor(1, 4, 1);
lean_ctor_set(x_27, 0, x_17);
lean_ctor_set(x_27, 1, x_18);
lean_ctor_set(x_27, 2, x_19);
lean_ctor_set(x_27, 3, x_26);
lean_ctor_set_uint8(x_27, sizeof(void*)*4, x_7);
return x_27;
}
}
}
}
else
{
lean_object* x_28; lean_object* x_29; lean_object* x_30; lean_object* x_31; lean_object* x_32; lean_object* x_33; uint8_t x_34; 
x_28 = lean_ctor_get(x_2, 0);
lean_inc(x_28);
x_29 = lean_ctor_get(x_2, 1);
lean_inc(x_29);
x_30 = lean_ctor_get(x_2, 2);
lean_inc(x_30);
x_31 = lean_ctor_get(x_2, 3);
lean_inc(x_31);
if (lean_is_exclusive(x_2)) {
 lean_ctor_release(x_2, 0);
 lean_ctor_release(x_2, 1);
 lean_ctor_release(x_2, 2);
 lean_ctor_release(x_2, 3);
 x_32 = x_2;
} else {
 lean_dec_ref(x_2);
 x_32 = lean_box(0);
}
lean_inc_ref(x_1);
lean_inc(x_29);
lean_inc(x_3);
x_33 = lean_apply_2(x_1, x_3, x_29);
x_34 = lean_unbox(x_33);
switch (x_34) {
case 0:
{
lean_object* x_35; 
x_35 = l_Lean_RBNode_ins___at___00Lean_RBNode_insert___at___00Lean_RBMap_mergeBy_spec__0_spec__0___redArg(x_1, x_28, x_3, x_4);
if (lean_obj_tag(x_35) == 1)
{
uint8_t x_36; lean_object* x_37; lean_object* x_38; lean_object* x_39; lean_object* x_40; lean_object* x_41; lean_object* x_42; lean_object* x_43; lean_object* x_44; lean_object* x_45; lean_object* x_46; lean_object* x_47; lean_object* x_48; lean_object* x_49; lean_object* x_50; 
x_36 = lean_ctor_get_uint8(x_35, sizeof(void*)*4);
x_37 = lean_ctor_get(x_35, 0);
lean_inc(x_37);
x_38 = lean_ctor_get(x_35, 1);
lean_inc(x_38);
x_39 = lean_ctor_get(x_35, 2);
lean_inc(x_39);
x_40 = lean_ctor_get(x_35, 3);
lean_inc(x_40);
if (x_36 == 0)
{
if (lean_obj_tag(x_37) == 1)
{
uint8_t x_55; 
x_55 = lean_ctor_get_uint8(x_37, sizeof(void*)*4);
if (x_55 == 0)
{
lean_object* x_56; lean_object* x_57; lean_object* x_58; lean_object* x_59; 
lean_dec_ref(x_35);
x_56 = lean_ctor_get(x_37, 0);
lean_inc(x_56);
x_57 = lean_ctor_get(x_37, 1);
lean_inc(x_57);
x_58 = lean_ctor_get(x_37, 2);
lean_inc(x_58);
x_59 = lean_ctor_get(x_37, 3);
lean_inc(x_59);
lean_dec_ref(x_37);
x_41 = x_56;
x_42 = x_57;
x_43 = x_58;
x_44 = x_59;
x_45 = x_38;
x_46 = x_39;
x_47 = x_40;
x_48 = x_29;
x_49 = x_30;
x_50 = x_31;
goto block_54;
}
else
{
if (lean_obj_tag(x_40) == 1)
{
uint8_t x_60; 
x_60 = lean_ctor_get_uint8(x_40, sizeof(void*)*4);
if (x_60 == 0)
{
lean_object* x_61; lean_object* x_62; lean_object* x_63; lean_object* x_64; 
lean_dec_ref(x_35);
x_61 = lean_ctor_get(x_40, 0);
lean_inc(x_61);
x_62 = lean_ctor_get(x_40, 1);
lean_inc(x_62);
x_63 = lean_ctor_get(x_40, 2);
lean_inc(x_63);
x_64 = lean_ctor_get(x_40, 3);
lean_inc(x_64);
lean_dec_ref(x_40);
x_41 = x_37;
x_42 = x_38;
x_43 = x_39;
x_44 = x_61;
x_45 = x_62;
x_46 = x_63;
x_47 = x_64;
x_48 = x_29;
x_49 = x_30;
x_50 = x_31;
goto block_54;
}
else
{
uint8_t x_65; 
lean_dec(x_39);
lean_dec(x_38);
lean_dec_ref(x_37);
lean_dec(x_32);
x_65 = !lean_is_exclusive(x_40);
if (x_65 == 0)
{
lean_object* x_66; lean_object* x_67; lean_object* x_68; lean_object* x_69; 
x_66 = lean_ctor_get(x_40, 3);
lean_dec(x_66);
x_67 = lean_ctor_get(x_40, 2);
lean_dec(x_67);
x_68 = lean_ctor_get(x_40, 1);
lean_dec(x_68);
x_69 = lean_ctor_get(x_40, 0);
lean_dec(x_69);
lean_ctor_set(x_40, 3, x_31);
lean_ctor_set(x_40, 2, x_30);
lean_ctor_set(x_40, 1, x_29);
lean_ctor_set(x_40, 0, x_35);
lean_ctor_set_uint8(x_40, sizeof(void*)*4, x_7);
return x_40;
}
else
{
lean_object* x_70; 
lean_dec(x_40);
x_70 = lean_alloc_ctor(1, 4, 1);
lean_ctor_set(x_70, 0, x_35);
lean_ctor_set(x_70, 1, x_29);
lean_ctor_set(x_70, 2, x_30);
lean_ctor_set(x_70, 3, x_31);
lean_ctor_set_uint8(x_70, sizeof(void*)*4, x_7);
return x_70;
}
}
}
else
{
uint8_t x_71; 
lean_dec(x_40);
lean_dec(x_39);
lean_dec(x_38);
lean_dec(x_32);
x_71 = !lean_is_exclusive(x_37);
if (x_71 == 0)
{
lean_object* x_72; lean_object* x_73; lean_object* x_74; lean_object* x_75; 
x_72 = lean_ctor_get(x_37, 3);
lean_dec(x_72);
x_73 = lean_ctor_get(x_37, 2);
lean_dec(x_73);
x_74 = lean_ctor_get(x_37, 1);
lean_dec(x_74);
x_75 = lean_ctor_get(x_37, 0);
lean_dec(x_75);
lean_ctor_set(x_37, 3, x_31);
lean_ctor_set(x_37, 2, x_30);
lean_ctor_set(x_37, 1, x_29);
lean_ctor_set(x_37, 0, x_35);
lean_ctor_set_uint8(x_37, sizeof(void*)*4, x_7);
return x_37;
}
else
{
lean_object* x_76; 
lean_dec(x_37);
x_76 = lean_alloc_ctor(1, 4, 1);
lean_ctor_set(x_76, 0, x_35);
lean_ctor_set(x_76, 1, x_29);
lean_ctor_set(x_76, 2, x_30);
lean_ctor_set(x_76, 3, x_31);
lean_ctor_set_uint8(x_76, sizeof(void*)*4, x_7);
return x_76;
}
}
}
}
else
{
if (lean_obj_tag(x_40) == 1)
{
uint8_t x_77; 
x_77 = lean_ctor_get_uint8(x_40, sizeof(void*)*4);
if (x_77 == 0)
{
lean_object* x_78; lean_object* x_79; lean_object* x_80; lean_object* x_81; 
lean_dec_ref(x_35);
x_78 = lean_ctor_get(x_40, 0);
lean_inc(x_78);
x_79 = lean_ctor_get(x_40, 1);
lean_inc(x_79);
x_80 = lean_ctor_get(x_40, 2);
lean_inc(x_80);
x_81 = lean_ctor_get(x_40, 3);
lean_inc(x_81);
lean_dec_ref(x_40);
x_41 = x_37;
x_42 = x_38;
x_43 = x_39;
x_44 = x_78;
x_45 = x_79;
x_46 = x_80;
x_47 = x_81;
x_48 = x_29;
x_49 = x_30;
x_50 = x_31;
goto block_54;
}
else
{
uint8_t x_82; 
lean_dec(x_39);
lean_dec(x_38);
lean_dec(x_37);
lean_dec(x_32);
x_82 = !lean_is_exclusive(x_40);
if (x_82 == 0)
{
lean_object* x_83; lean_object* x_84; lean_object* x_85; lean_object* x_86; 
x_83 = lean_ctor_get(x_40, 3);
lean_dec(x_83);
x_84 = lean_ctor_get(x_40, 2);
lean_dec(x_84);
x_85 = lean_ctor_get(x_40, 1);
lean_dec(x_85);
x_86 = lean_ctor_get(x_40, 0);
lean_dec(x_86);
lean_ctor_set(x_40, 3, x_31);
lean_ctor_set(x_40, 2, x_30);
lean_ctor_set(x_40, 1, x_29);
lean_ctor_set(x_40, 0, x_35);
lean_ctor_set_uint8(x_40, sizeof(void*)*4, x_7);
return x_40;
}
else
{
lean_object* x_87; 
lean_dec(x_40);
x_87 = lean_alloc_ctor(1, 4, 1);
lean_ctor_set(x_87, 0, x_35);
lean_ctor_set(x_87, 1, x_29);
lean_ctor_set(x_87, 2, x_30);
lean_ctor_set(x_87, 3, x_31);
lean_ctor_set_uint8(x_87, sizeof(void*)*4, x_7);
return x_87;
}
}
}
else
{
lean_object* x_88; 
lean_dec(x_40);
lean_dec(x_39);
lean_dec(x_38);
lean_dec(x_37);
lean_dec(x_32);
x_88 = lean_alloc_ctor(1, 4, 1);
lean_ctor_set(x_88, 0, x_35);
lean_ctor_set(x_88, 1, x_29);
lean_ctor_set(x_88, 2, x_30);
lean_ctor_set(x_88, 3, x_31);
lean_ctor_set_uint8(x_88, sizeof(void*)*4, x_7);
return x_88;
}
}
}
else
{
lean_object* x_89; 
lean_dec(x_40);
lean_dec(x_39);
lean_dec(x_38);
lean_dec(x_37);
lean_dec(x_32);
x_89 = lean_alloc_ctor(1, 4, 1);
lean_ctor_set(x_89, 0, x_35);
lean_ctor_set(x_89, 1, x_29);
lean_ctor_set(x_89, 2, x_30);
lean_ctor_set(x_89, 3, x_31);
lean_ctor_set_uint8(x_89, sizeof(void*)*4, x_7);
return x_89;
}
block_54:
{
lean_object* x_51; lean_object* x_52; lean_object* x_53; 
if (lean_is_scalar(x_32)) {
 x_51 = lean_alloc_ctor(1, 4, 1);
} else {
 x_51 = x_32;
}
lean_ctor_set(x_51, 0, x_41);
lean_ctor_set(x_51, 1, x_42);
lean_ctor_set(x_51, 2, x_43);
lean_ctor_set(x_51, 3, x_44);
lean_ctor_set_uint8(x_51, sizeof(void*)*4, x_7);
x_52 = lean_alloc_ctor(1, 4, 1);
lean_ctor_set(x_52, 0, x_47);
lean_ctor_set(x_52, 1, x_48);
lean_ctor_set(x_52, 2, x_49);
lean_ctor_set(x_52, 3, x_50);
lean_ctor_set_uint8(x_52, sizeof(void*)*4, x_7);
x_53 = lean_alloc_ctor(1, 4, 1);
lean_ctor_set(x_53, 0, x_51);
lean_ctor_set(x_53, 1, x_45);
lean_ctor_set(x_53, 2, x_46);
lean_ctor_set(x_53, 3, x_52);
lean_ctor_set_uint8(x_53, sizeof(void*)*4, x_36);
return x_53;
}
}
else
{
lean_object* x_90; 
if (lean_is_scalar(x_32)) {
 x_90 = lean_alloc_ctor(1, 4, 1);
} else {
 x_90 = x_32;
}
lean_ctor_set(x_90, 0, x_35);
lean_ctor_set(x_90, 1, x_29);
lean_ctor_set(x_90, 2, x_30);
lean_ctor_set(x_90, 3, x_31);
lean_ctor_set_uint8(x_90, sizeof(void*)*4, x_7);
return x_90;
}
}
case 1:
{
lean_object* x_91; 
lean_dec(x_30);
lean_dec(x_29);
lean_dec_ref(x_1);
if (lean_is_scalar(x_32)) {
 x_91 = lean_alloc_ctor(1, 4, 1);
} else {
 x_91 = x_32;
}
lean_ctor_set(x_91, 0, x_28);
lean_ctor_set(x_91, 1, x_3);
lean_ctor_set(x_91, 2, x_4);
lean_ctor_set(x_91, 3, x_31);
lean_ctor_set_uint8(x_91, sizeof(void*)*4, x_7);
return x_91;
}
default: 
{
lean_object* x_92; 
x_92 = l_Lean_RBNode_ins___at___00Lean_RBNode_insert___at___00Lean_RBMap_mergeBy_spec__0_spec__0___redArg(x_1, x_31, x_3, x_4);
if (lean_obj_tag(x_92) == 1)
{
uint8_t x_93; lean_object* x_94; lean_object* x_95; lean_object* x_96; lean_object* x_97; lean_object* x_98; lean_object* x_99; lean_object* x_100; lean_object* x_101; lean_object* x_102; lean_object* x_103; lean_object* x_104; lean_object* x_105; lean_object* x_106; lean_object* x_107; 
x_93 = lean_ctor_get_uint8(x_92, sizeof(void*)*4);
x_94 = lean_ctor_get(x_92, 0);
lean_inc(x_94);
x_95 = lean_ctor_get(x_92, 1);
lean_inc(x_95);
x_96 = lean_ctor_get(x_92, 2);
lean_inc(x_96);
x_97 = lean_ctor_get(x_92, 3);
lean_inc(x_97);
if (x_93 == 0)
{
if (lean_obj_tag(x_94) == 1)
{
uint8_t x_112; 
x_112 = lean_ctor_get_uint8(x_94, sizeof(void*)*4);
if (x_112 == 0)
{
lean_object* x_113; lean_object* x_114; lean_object* x_115; lean_object* x_116; 
lean_dec_ref(x_92);
x_113 = lean_ctor_get(x_94, 0);
lean_inc(x_113);
x_114 = lean_ctor_get(x_94, 1);
lean_inc(x_114);
x_115 = lean_ctor_get(x_94, 2);
lean_inc(x_115);
x_116 = lean_ctor_get(x_94, 3);
lean_inc(x_116);
lean_dec_ref(x_94);
x_98 = x_28;
x_99 = x_29;
x_100 = x_30;
x_101 = x_113;
x_102 = x_114;
x_103 = x_115;
x_104 = x_116;
x_105 = x_95;
x_106 = x_96;
x_107 = x_97;
goto block_111;
}
else
{
if (lean_obj_tag(x_97) == 1)
{
uint8_t x_117; 
x_117 = lean_ctor_get_uint8(x_97, sizeof(void*)*4);
if (x_117 == 0)
{
lean_object* x_118; lean_object* x_119; lean_object* x_120; lean_object* x_121; 
lean_dec_ref(x_92);
x_118 = lean_ctor_get(x_97, 0);
lean_inc(x_118);
x_119 = lean_ctor_get(x_97, 1);
lean_inc(x_119);
x_120 = lean_ctor_get(x_97, 2);
lean_inc(x_120);
x_121 = lean_ctor_get(x_97, 3);
lean_inc(x_121);
lean_dec_ref(x_97);
x_98 = x_28;
x_99 = x_29;
x_100 = x_30;
x_101 = x_94;
x_102 = x_95;
x_103 = x_96;
x_104 = x_118;
x_105 = x_119;
x_106 = x_120;
x_107 = x_121;
goto block_111;
}
else
{
uint8_t x_122; 
lean_dec(x_96);
lean_dec(x_95);
lean_dec_ref(x_94);
lean_dec(x_32);
x_122 = !lean_is_exclusive(x_97);
if (x_122 == 0)
{
lean_object* x_123; lean_object* x_124; lean_object* x_125; lean_object* x_126; 
x_123 = lean_ctor_get(x_97, 3);
lean_dec(x_123);
x_124 = lean_ctor_get(x_97, 2);
lean_dec(x_124);
x_125 = lean_ctor_get(x_97, 1);
lean_dec(x_125);
x_126 = lean_ctor_get(x_97, 0);
lean_dec(x_126);
lean_ctor_set(x_97, 3, x_92);
lean_ctor_set(x_97, 2, x_30);
lean_ctor_set(x_97, 1, x_29);
lean_ctor_set(x_97, 0, x_28);
lean_ctor_set_uint8(x_97, sizeof(void*)*4, x_7);
return x_97;
}
else
{
lean_object* x_127; 
lean_dec(x_97);
x_127 = lean_alloc_ctor(1, 4, 1);
lean_ctor_set(x_127, 0, x_28);
lean_ctor_set(x_127, 1, x_29);
lean_ctor_set(x_127, 2, x_30);
lean_ctor_set(x_127, 3, x_92);
lean_ctor_set_uint8(x_127, sizeof(void*)*4, x_7);
return x_127;
}
}
}
else
{
uint8_t x_128; 
lean_dec(x_97);
lean_dec(x_96);
lean_dec(x_95);
lean_dec(x_32);
x_128 = !lean_is_exclusive(x_94);
if (x_128 == 0)
{
lean_object* x_129; lean_object* x_130; lean_object* x_131; lean_object* x_132; 
x_129 = lean_ctor_get(x_94, 3);
lean_dec(x_129);
x_130 = lean_ctor_get(x_94, 2);
lean_dec(x_130);
x_131 = lean_ctor_get(x_94, 1);
lean_dec(x_131);
x_132 = lean_ctor_get(x_94, 0);
lean_dec(x_132);
lean_ctor_set(x_94, 3, x_92);
lean_ctor_set(x_94, 2, x_30);
lean_ctor_set(x_94, 1, x_29);
lean_ctor_set(x_94, 0, x_28);
lean_ctor_set_uint8(x_94, sizeof(void*)*4, x_7);
return x_94;
}
else
{
lean_object* x_133; 
lean_dec(x_94);
x_133 = lean_alloc_ctor(1, 4, 1);
lean_ctor_set(x_133, 0, x_28);
lean_ctor_set(x_133, 1, x_29);
lean_ctor_set(x_133, 2, x_30);
lean_ctor_set(x_133, 3, x_92);
lean_ctor_set_uint8(x_133, sizeof(void*)*4, x_7);
return x_133;
}
}
}
}
else
{
if (lean_obj_tag(x_97) == 1)
{
uint8_t x_134; 
x_134 = lean_ctor_get_uint8(x_97, sizeof(void*)*4);
if (x_134 == 0)
{
lean_object* x_135; lean_object* x_136; lean_object* x_137; lean_object* x_138; 
lean_dec_ref(x_92);
x_135 = lean_ctor_get(x_97, 0);
lean_inc(x_135);
x_136 = lean_ctor_get(x_97, 1);
lean_inc(x_136);
x_137 = lean_ctor_get(x_97, 2);
lean_inc(x_137);
x_138 = lean_ctor_get(x_97, 3);
lean_inc(x_138);
lean_dec_ref(x_97);
x_98 = x_28;
x_99 = x_29;
x_100 = x_30;
x_101 = x_94;
x_102 = x_95;
x_103 = x_96;
x_104 = x_135;
x_105 = x_136;
x_106 = x_137;
x_107 = x_138;
goto block_111;
}
else
{
uint8_t x_139; 
lean_dec(x_96);
lean_dec(x_95);
lean_dec(x_94);
lean_dec(x_32);
x_139 = !lean_is_exclusive(x_97);
if (x_139 == 0)
{
lean_object* x_140; lean_object* x_141; lean_object* x_142; lean_object* x_143; 
x_140 = lean_ctor_get(x_97, 3);
lean_dec(x_140);
x_141 = lean_ctor_get(x_97, 2);
lean_dec(x_141);
x_142 = lean_ctor_get(x_97, 1);
lean_dec(x_142);
x_143 = lean_ctor_get(x_97, 0);
lean_dec(x_143);
lean_ctor_set(x_97, 3, x_92);
lean_ctor_set(x_97, 2, x_30);
lean_ctor_set(x_97, 1, x_29);
lean_ctor_set(x_97, 0, x_28);
lean_ctor_set_uint8(x_97, sizeof(void*)*4, x_7);
return x_97;
}
else
{
lean_object* x_144; 
lean_dec(x_97);
x_144 = lean_alloc_ctor(1, 4, 1);
lean_ctor_set(x_144, 0, x_28);
lean_ctor_set(x_144, 1, x_29);
lean_ctor_set(x_144, 2, x_30);
lean_ctor_set(x_144, 3, x_92);
lean_ctor_set_uint8(x_144, sizeof(void*)*4, x_7);
return x_144;
}
}
}
else
{
lean_object* x_145; 
lean_dec(x_97);
lean_dec(x_96);
lean_dec(x_95);
lean_dec(x_94);
lean_dec(x_32);
x_145 = lean_alloc_ctor(1, 4, 1);
lean_ctor_set(x_145, 0, x_28);
lean_ctor_set(x_145, 1, x_29);
lean_ctor_set(x_145, 2, x_30);
lean_ctor_set(x_145, 3, x_92);
lean_ctor_set_uint8(x_145, sizeof(void*)*4, x_7);
return x_145;
}
}
}
else
{
lean_object* x_146; 
lean_dec(x_97);
lean_dec(x_96);
lean_dec(x_95);
lean_dec(x_94);
lean_dec(x_32);
x_146 = lean_alloc_ctor(1, 4, 1);
lean_ctor_set(x_146, 0, x_28);
lean_ctor_set(x_146, 1, x_29);
lean_ctor_set(x_146, 2, x_30);
lean_ctor_set(x_146, 3, x_92);
lean_ctor_set_uint8(x_146, sizeof(void*)*4, x_7);
return x_146;
}
block_111:
{
lean_object* x_108; lean_object* x_109; lean_object* x_110; 
if (lean_is_scalar(x_32)) {
 x_108 = lean_alloc_ctor(1, 4, 1);
} else {
 x_108 = x_32;
}
lean_ctor_set(x_108, 0, x_98);
lean_ctor_set(x_108, 1, x_99);
lean_ctor_set(x_108, 2, x_100);
lean_ctor_set(x_108, 3, x_101);
lean_ctor_set_uint8(x_108, sizeof(void*)*4, x_7);
x_109 = lean_alloc_ctor(1, 4, 1);
lean_ctor_set(x_109, 0, x_104);
lean_ctor_set(x_109, 1, x_105);
lean_ctor_set(x_109, 2, x_106);
lean_ctor_set(x_109, 3, x_107);
lean_ctor_set_uint8(x_109, sizeof(void*)*4, x_7);
x_110 = lean_alloc_ctor(1, 4, 1);
lean_ctor_set(x_110, 0, x_108);
lean_ctor_set(x_110, 1, x_102);
lean_ctor_set(x_110, 2, x_103);
lean_ctor_set(x_110, 3, x_109);
lean_ctor_set_uint8(x_110, sizeof(void*)*4, x_93);
return x_110;
}
}
else
{
lean_object* x_147; 
if (lean_is_scalar(x_32)) {
 x_147 = lean_alloc_ctor(1, 4, 1);
} else {
 x_147 = x_32;
}
lean_ctor_set(x_147, 0, x_28);
lean_ctor_set(x_147, 1, x_29);
lean_ctor_set(x_147, 2, x_30);
lean_ctor_set(x_147, 3, x_92);
lean_ctor_set_uint8(x_147, sizeof(void*)*4, x_7);
return x_147;
}
}
}
}
}
}
}
LEAN_EXPORT lean_object* l_Lean_RBNode_insert___at___00Lean_RBMap_mergeBy_spec__0___redArg(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) {
_start:
{
uint8_t x_5; 
x_5 = l_Lean_RBNode_isRed___redArg(x_2);
if (x_5 == 0)
{
lean_object* x_6; 
x_6 = l_Lean_RBNode_ins___at___00Lean_RBNode_insert___at___00Lean_RBMap_mergeBy_spec__0_spec__0___redArg(x_1, x_2, x_3, x_4);
return x_6;
}
else
{
lean_object* x_7; lean_object* x_8; 
x_7 = l_Lean_RBNode_ins___at___00Lean_RBNode_insert___at___00Lean_RBMap_mergeBy_spec__0_spec__0___redArg(x_1, x_2, x_3, x_4);
x_8 = l_Lean_RBNode_setBlack___redArg(x_7);
return x_8;
}
}
}
LEAN_EXPORT lean_object* l_Lean_RBNode_find___at___00Lean_RBMap_mergeBy_spec__2___redArg(lean_object* x_1, lean_object* x_2, lean_object* x_3) {
_start:
{
if (lean_obj_tag(x_2) == 0)
{
lean_object* x_4; 
lean_dec(x_3);
lean_dec_ref(x_1);
x_4 = lean_box(0);
return x_4;
}
else
{
lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; uint8_t x_10; 
x_5 = lean_ctor_get(x_2, 0);
lean_inc(x_5);
x_6 = lean_ctor_get(x_2, 1);
lean_inc(x_6);
x_7 = lean_ctor_get(x_2, 2);
lean_inc(x_7);
x_8 = lean_ctor_get(x_2, 3);
lean_inc(x_8);
lean_dec_ref(x_2);
lean_inc_ref(x_1);
lean_inc(x_3);
x_9 = lean_apply_2(x_1, x_3, x_6);
x_10 = lean_unbox(x_9);
switch (x_10) {
case 0:
{
lean_dec(x_8);
lean_dec(x_7);
x_2 = x_5;
goto _start;
}
case 1:
{
lean_object* x_12; 
lean_dec(x_8);
lean_dec(x_5);
lean_dec(x_3);
lean_dec_ref(x_1);
x_12 = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(x_12, 0, x_7);
return x_12;
}
default: 
{
lean_dec(x_7);
lean_dec(x_5);
x_2 = x_8;
goto _start;
}
}
}
}
}
LEAN_EXPORT lean_object* l_Lean_RBNode_fold___at___00Lean_RBMap_mergeBy_spec__3___redArg(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) {
_start:
{
if (lean_obj_tag(x_4) == 0)
{
lean_dec(x_2);
lean_dec_ref(x_1);
return x_3;
}
else
{
lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_14; 
x_5 = lean_ctor_get(x_4, 0);
lean_inc(x_5);
x_6 = lean_ctor_get(x_4, 1);
lean_inc(x_6);
x_7 = lean_ctor_get(x_4, 2);
lean_inc(x_7);
x_8 = lean_ctor_get(x_4, 3);
lean_inc(x_8);
lean_dec_ref(x_4);
lean_inc(x_2);
lean_inc_ref(x_1);
x_9 = l_Lean_RBNode_fold___at___00Lean_RBMap_mergeBy_spec__3___redArg(x_1, x_2, x_3, x_5);
lean_inc(x_6);
lean_inc(x_9);
lean_inc_ref(x_1);
x_14 = l_Lean_RBNode_find___at___00Lean_RBMap_mergeBy_spec__2___redArg(x_1, x_9, x_6);
if (lean_obj_tag(x_14) == 0)
{
x_10 = x_7;
goto block_13;
}
else
{
lean_object* x_15; lean_object* x_16; 
x_15 = lean_ctor_get(x_14, 0);
lean_inc(x_15);
lean_dec_ref(x_14);
lean_inc(x_2);
lean_inc(x_6);
x_16 = lean_apply_3(x_2, x_6, x_15, x_7);
x_10 = x_16;
goto block_13;
}
block_13:
{
lean_object* x_11; 
lean_inc_ref(x_1);
x_11 = l_Lean_RBNode_insert___at___00Lean_RBMap_mergeBy_spec__0___redArg(x_1, x_9, x_6, x_10);
x_3 = x_11;
x_4 = x_8;
goto _start;
}
}
}
}
LEAN_EXPORT lean_object* l_Lean_RBMap_mergeBy(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6) {
_start:
{
lean_object* x_7; 
x_7 = l_Lean_RBNode_fold___at___00Lean_RBMap_mergeBy_spec__3___redArg(x_3, x_4, x_5, x_6);
return x_7;
}
}
LEAN_EXPORT lean_object* l_Lean_RBMap_mergeBy___redArg(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) {
_start:
{
lean_object* x_5; 
x_5 = l_Lean_RBNode_fold___at___00Lean_RBMap_mergeBy_spec__3___redArg(x_1, x_2, x_3, x_4);
return x_5;
}
}
LEAN_EXPORT lean_object* l_Lean_RBNode_find___at___00Lean_RBMap_mergeBy_spec__2(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) {
_start:
{
lean_object* x_6; 
x_6 = l_Lean_RBNode_find___at___00Lean_RBMap_mergeBy_spec__2___redArg(x_2, x_4, x_5);
return x_6;
}
}
LEAN_EXPORT lean_object* l_Lean_RBNode_fold___at___00Lean_RBMap_mergeBy_spec__3(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6) {
_start:
{
lean_object* x_7; 
x_7 = l_Lean_RBNode_fold___at___00Lean_RBMap_mergeBy_spec__3___redArg(x_3, x_4, x_5, x_6);
return x_7;
}
}
LEAN_EXPORT lean_object* l_Lean_RBNode_ins___at___00Lean_RBNode_insert___at___00Lean_RBMap_mergeBy_spec__0_spec__0(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6) {
_start:
{
lean_object* x_7; 
x_7 = l_Lean_RBNode_ins___at___00Lean_RBNode_insert___at___00Lean_RBMap_mergeBy_spec__0_spec__0___redArg(x_2, x_4, x_5, x_6);
return x_7;
}
}
LEAN_EXPORT lean_object* l_Lean_RBNode_insert___at___00Lean_RBMap_mergeBy_spec__0(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6) {
_start:
{
lean_object* x_7; 
x_7 = l_Lean_RBNode_insert___at___00Lean_RBMap_mergeBy_spec__0___redArg(x_2, x_4, x_5, x_6);
return x_7;
}
}
LEAN_EXPORT lean_object* l_Lean_RBNode_fold___at___00Lean_RBMap_intersectBy_spec__0___redArg(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) {
_start:
{
if (lean_obj_tag(x_5) == 0)
{
lean_dec(x_3);
lean_dec_ref(x_2);
lean_dec(x_1);
return x_4;
}
else
{
lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; 
x_6 = lean_ctor_get(x_5, 0);
lean_inc(x_6);
x_7 = lean_ctor_get(x_5, 1);
lean_inc(x_7);
x_8 = lean_ctor_get(x_5, 2);
lean_inc(x_8);
x_9 = lean_ctor_get(x_5, 3);
lean_inc(x_9);
lean_dec_ref(x_5);
lean_inc(x_3);
lean_inc_ref(x_2);
lean_inc(x_1);
x_10 = l_Lean_RBNode_fold___at___00Lean_RBMap_intersectBy_spec__0___redArg(x_1, x_2, x_3, x_4, x_6);
lean_inc(x_7);
lean_inc(x_1);
lean_inc_ref(x_2);
x_11 = l_Lean_RBNode_find___at___00Lean_RBMap_mergeBy_spec__2___redArg(x_2, x_1, x_7);
if (lean_obj_tag(x_11) == 0)
{
lean_dec(x_8);
lean_dec(x_7);
x_4 = x_10;
x_5 = x_9;
goto _start;
}
else
{
lean_object* x_13; lean_object* x_14; lean_object* x_15; 
x_13 = lean_ctor_get(x_11, 0);
lean_inc(x_13);
lean_dec_ref(x_11);
lean_inc(x_3);
lean_inc(x_7);
x_14 = lean_apply_3(x_3, x_7, x_8, x_13);
lean_inc_ref(x_2);
x_15 = l_Lean_RBNode_insert___at___00Lean_RBMap_mergeBy_spec__0___redArg(x_2, x_10, x_7, x_14);
x_4 = x_15;
x_5 = x_9;
goto _start;
}
}
}
}
LEAN_EXPORT lean_object* l_Lean_RBMap_intersectBy___redArg(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) {
_start:
{
lean_object* x_5; lean_object* x_6; 
x_5 = lean_box(0);
x_6 = l_Lean_RBNode_fold___at___00Lean_RBMap_intersectBy_spec__0___redArg(x_4, x_1, x_2, x_5, x_3);
return x_6;
}
}
LEAN_EXPORT lean_object* l_Lean_RBMap_intersectBy(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8) {
_start:
{
lean_object* x_9; 
x_9 = l_Lean_RBMap_intersectBy___redArg(x_3, x_6, x_7, x_8);
return x_9;
}
}
LEAN_EXPORT lean_object* l_Lean_RBNode_fold___at___00Lean_RBMap_intersectBy_spec__0(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9) {
_start:
{
lean_object* x_10; 
x_10 = l_Lean_RBNode_fold___at___00Lean_RBMap_intersectBy_spec__0___redArg(x_5, x_6, x_7, x_8, x_9);
return x_10;
}
}
LEAN_EXPORT lean_object* l_Lean_RBNode_fold___at___00Lean_RBMap_filter_spec__0___redArg(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) {
_start:
{
if (lean_obj_tag(x_4) == 0)
{
lean_dec_ref(x_2);
lean_dec_ref(x_1);
return x_3;
}
else
{
lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; uint8_t x_11; 
x_5 = lean_ctor_get(x_4, 0);
lean_inc(x_5);
x_6 = lean_ctor_get(x_4, 1);
lean_inc(x_6);
x_7 = lean_ctor_get(x_4, 2);
lean_inc(x_7);
x_8 = lean_ctor_get(x_4, 3);
lean_inc(x_8);
lean_dec_ref(x_4);
lean_inc_ref(x_2);
lean_inc_ref(x_1);
x_9 = l_Lean_RBNode_fold___at___00Lean_RBMap_filter_spec__0___redArg(x_1, x_2, x_3, x_5);
lean_inc_ref(x_1);
lean_inc(x_7);
lean_inc(x_6);
x_10 = lean_apply_2(x_1, x_6, x_7);
x_11 = lean_unbox(x_10);
if (x_11 == 0)
{
lean_dec(x_7);
lean_dec(x_6);
x_3 = x_9;
x_4 = x_8;
goto _start;
}
else
{
lean_object* x_13; 
lean_inc_ref(x_2);
x_13 = l_Lean_RBNode_insert___at___00Lean_RBMap_mergeBy_spec__0___redArg(x_2, x_9, x_6, x_7);
x_3 = x_13;
x_4 = x_8;
goto _start;
}
}
}
}
LEAN_EXPORT lean_object* l_Lean_RBMap_filter___redArg(lean_object* x_1, lean_object* x_2, lean_object* x_3) {
_start:
{
lean_object* x_4; lean_object* x_5; 
x_4 = lean_box(0);
x_5 = l_Lean_RBNode_fold___at___00Lean_RBMap_filter_spec__0___redArg(x_2, x_1, x_4, x_3);
return x_5;
}
}
LEAN_EXPORT lean_object* l_Lean_RBMap_filter(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) {
_start:
{
lean_object* x_6; 
x_6 = l_Lean_RBMap_filter___redArg(x_3, x_4, x_5);
return x_6;
}
}
LEAN_EXPORT lean_object* l_Lean_RBNode_fold___at___00Lean_RBMap_filter_spec__0(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6) {
_start:
{
lean_object* x_7; 
x_7 = l_Lean_RBNode_fold___at___00Lean_RBMap_filter_spec__0___redArg(x_3, x_4, x_5, x_6);
return x_7;
}
}
LEAN_EXPORT lean_object* l_Lean_RBNode_fold___at___00Lean_RBMap_filterMap_spec__0___redArg(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) {
_start:
{
if (lean_obj_tag(x_4) == 0)
{
lean_dec_ref(x_2);
lean_dec_ref(x_1);
return x_3;
}
else
{
lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; 
x_5 = lean_ctor_get(x_4, 0);
lean_inc(x_5);
x_6 = lean_ctor_get(x_4, 1);
lean_inc(x_6);
x_7 = lean_ctor_get(x_4, 2);
lean_inc(x_7);
x_8 = lean_ctor_get(x_4, 3);
lean_inc(x_8);
lean_dec_ref(x_4);
lean_inc_ref(x_2);
lean_inc_ref(x_1);
x_9 = l_Lean_RBNode_fold___at___00Lean_RBMap_filterMap_spec__0___redArg(x_1, x_2, x_3, x_5);
lean_inc_ref(x_1);
lean_inc(x_6);
x_10 = lean_apply_2(x_1, x_6, x_7);
if (lean_obj_tag(x_10) == 0)
{
lean_dec(x_6);
x_3 = x_9;
x_4 = x_8;
goto _start;
}
else
{
lean_object* x_12; lean_object* x_13; 
x_12 = lean_ctor_get(x_10, 0);
lean_inc(x_12);
lean_dec_ref(x_10);
lean_inc_ref(x_2);
x_13 = l_Lean_RBNode_insert___at___00Lean_RBMap_mergeBy_spec__0___redArg(x_2, x_9, x_6, x_12);
x_3 = x_13;
x_4 = x_8;
goto _start;
}
}
}
}
LEAN_EXPORT lean_object* l_Lean_RBMap_filterMap___redArg(lean_object* x_1, lean_object* x_2, lean_object* x_3) {
_start:
{
lean_object* x_4; lean_object* x_5; 
x_4 = lean_box(0);
x_5 = l_Lean_RBNode_fold___at___00Lean_RBMap_filterMap_spec__0___redArg(x_2, x_1, x_4, x_3);
return x_5;
}
}
LEAN_EXPORT lean_object* l_Lean_RBMap_filterMap(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6) {
_start:
{
lean_object* x_7; 
x_7 = l_Lean_RBMap_filterMap___redArg(x_3, x_5, x_6);
return x_7;
}
}
LEAN_EXPORT lean_object* l_Lean_RBNode_fold___at___00Lean_RBMap_filterMap_spec__0(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7) {
_start:
{
lean_object* x_8; 
x_8 = l_Lean_RBNode_fold___at___00Lean_RBMap_filterMap_spec__0___redArg(x_4, x_5, x_6, x_7);
return x_8;
}
}
LEAN_EXPORT lean_object* l_List_foldl___at___00Lean_rbmapOf_spec__0___redArg(lean_object* x_1, lean_object* x_2, lean_object* x_3) {
_start:
{
if (lean_obj_tag(x_3) == 0)
{
lean_dec_ref(x_1);
return x_2;
}
else
{
lean_object* x_4; lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; 
x_4 = lean_ctor_get(x_3, 0);
lean_inc(x_4);
x_5 = lean_ctor_get(x_3, 1);
lean_inc(x_5);
lean_dec_ref(x_3);
x_6 = lean_ctor_get(x_4, 0);
lean_inc(x_6);
x_7 = lean_ctor_get(x_4, 1);
lean_inc(x_7);
lean_dec(x_4);
lean_inc_ref(x_1);
x_8 = l_Lean_RBNode_insert___at___00Lean_RBMap_mergeBy_spec__0___redArg(x_1, x_2, x_6, x_7);
x_2 = x_8;
x_3 = x_5;
goto _start;
}
}
}
LEAN_EXPORT lean_object* l_Lean_rbmapOf___redArg(lean_object* x_1, lean_object* x_2) {
_start:
{
lean_object* x_3; lean_object* x_4; 
x_3 = lean_box(0);
x_4 = l_List_foldl___at___00Lean_rbmapOf_spec__0___redArg(x_2, x_3, x_1);
return x_4;
}
}
LEAN_EXPORT lean_object* l_Lean_rbmapOf(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) {
_start:
{
lean_object* x_5; 
x_5 = l_Lean_rbmapOf___redArg(x_3, x_4);
return x_5;
}
}
LEAN_EXPORT lean_object* l_List_foldl___at___00Lean_rbmapOf_spec__0(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) {
_start:
{
lean_object* x_6; 
x_6 = l_List_foldl___at___00Lean_rbmapOf_spec__0___redArg(x_3, x_4, x_5);
return x_6;
}
}
lean_object* initialize_Init_Data_Ord_Basic(uint8_t builtin);
lean_object* initialize_Init_Data_Nat_Linear(uint8_t builtin);
static bool _G_initialized = false;
LEAN_EXPORT lean_object* initialize_Lean_Data_RBMap(uint8_t builtin) {
lean_object * res;
if (_G_initialized) return lean_io_result_mk_ok(lean_box(0));
_G_initialized = true;
res = initialize_Init_Data_Ord_Basic(builtin);
if (lean_io_result_is_error(res)) return res;
lean_dec_ref(res);
res = initialize_Init_Data_Nat_Linear(builtin);
if (lean_io_result_is_error(res)) return res;
lean_dec_ref(res);
l_Lean_RBNode_toArray___redArg___closed__0 = _init_l_Lean_RBNode_toArray___redArg___closed__0();
lean_mark_persistent(l_Lean_RBNode_toArray___redArg___closed__0);
l_Lean_RBMap_toArray___redArg___closed__0 = _init_l_Lean_RBMap_toArray___redArg___closed__0();
lean_mark_persistent(l_Lean_RBMap_toArray___redArg___closed__0);
l_Lean_RBMap_instRepr___redArg___lam__0___closed__0 = _init_l_Lean_RBMap_instRepr___redArg___lam__0___closed__0();
lean_mark_persistent(l_Lean_RBMap_instRepr___redArg___lam__0___closed__0);
l_Lean_RBMap_instRepr___redArg___lam__0___closed__1 = _init_l_Lean_RBMap_instRepr___redArg___lam__0___closed__1();
lean_mark_persistent(l_Lean_RBMap_instRepr___redArg___lam__0___closed__1);
l_Lean_RBMap_fromArray___closed__0 = _init_l_Lean_RBMap_fromArray___closed__0();
lean_mark_persistent(l_Lean_RBMap_fromArray___closed__0);
l_Lean_RBMap_fromArray___closed__1 = _init_l_Lean_RBMap_fromArray___closed__1();
lean_mark_persistent(l_Lean_RBMap_fromArray___closed__1);
l_Lean_RBMap_fromArray___closed__2 = _init_l_Lean_RBMap_fromArray___closed__2();
lean_mark_persistent(l_Lean_RBMap_fromArray___closed__2);
l_Lean_RBMap_fromArray___closed__3 = _init_l_Lean_RBMap_fromArray___closed__3();
lean_mark_persistent(l_Lean_RBMap_fromArray___closed__3);
l_Lean_RBMap_fromArray___closed__4 = _init_l_Lean_RBMap_fromArray___closed__4();
lean_mark_persistent(l_Lean_RBMap_fromArray___closed__4);
l_Lean_RBMap_fromArray___closed__5 = _init_l_Lean_RBMap_fromArray___closed__5();
lean_mark_persistent(l_Lean_RBMap_fromArray___closed__5);
l_Lean_RBMap_fromArray___closed__6 = _init_l_Lean_RBMap_fromArray___closed__6();
lean_mark_persistent(l_Lean_RBMap_fromArray___closed__6);
l_Lean_RBMap_fromArray___closed__7 = _init_l_Lean_RBMap_fromArray___closed__7();
lean_mark_persistent(l_Lean_RBMap_fromArray___closed__7);
l_Lean_RBMap_fromArray___closed__8 = _init_l_Lean_RBMap_fromArray___closed__8();
lean_mark_persistent(l_Lean_RBMap_fromArray___closed__8);
l_Lean_RBMap_fromArray___closed__9 = _init_l_Lean_RBMap_fromArray___closed__9();
lean_mark_persistent(l_Lean_RBMap_fromArray___closed__9);
l_Lean_RBMap_min_x21___closed__0 = _init_l_Lean_RBMap_min_x21___closed__0();
lean_mark_persistent(l_Lean_RBMap_min_x21___closed__0);
l_Lean_RBMap_min_x21___closed__1 = _init_l_Lean_RBMap_min_x21___closed__1();
lean_mark_persistent(l_Lean_RBMap_min_x21___closed__1);
l_Lean_RBMap_min_x21___closed__2 = _init_l_Lean_RBMap_min_x21___closed__2();
lean_mark_persistent(l_Lean_RBMap_min_x21___closed__2);
l_Lean_RBMap_min_x21___closed__3 = _init_l_Lean_RBMap_min_x21___closed__3();
lean_mark_persistent(l_Lean_RBMap_min_x21___closed__3);
l_Lean_RBMap_max_x21___closed__0 = _init_l_Lean_RBMap_max_x21___closed__0();
lean_mark_persistent(l_Lean_RBMap_max_x21___closed__0);
l_Lean_RBMap_max_x21___closed__1 = _init_l_Lean_RBMap_max_x21___closed__1();
lean_mark_persistent(l_Lean_RBMap_max_x21___closed__1);
l_Lean_RBMap_find_x21___closed__0 = _init_l_Lean_RBMap_find_x21___closed__0();
lean_mark_persistent(l_Lean_RBMap_find_x21___closed__0);
l_Lean_RBMap_find_x21___closed__1 = _init_l_Lean_RBMap_find_x21___closed__1();
lean_mark_persistent(l_Lean_RBMap_find_x21___closed__1);
l_Lean_RBMap_find_x21___closed__2 = _init_l_Lean_RBMap_find_x21___closed__2();
lean_mark_persistent(l_Lean_RBMap_find_x21___closed__2);
return lean_io_result_mk_ok(lean_box(0));
}
#ifdef __cplusplus
}
#endif
